From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:14 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 13 15:13:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0001.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0002.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:07 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 13 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 13 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0003.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0004.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 20:01:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:08 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0005.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:09 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 14 12:00:38 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0006.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:36 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 14 16:00:36 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 14 16:00:36 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0007.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:37 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0008.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:34 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0009.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 08:01:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0010.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0011.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:38 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0012.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0013.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:17 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0014.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:40 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 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 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 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 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0015.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 16 16:00:37 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:33 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0016.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:34 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 17 08:02:18 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0017.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:18 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:19 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0018.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0019.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0020.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:42 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:03:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0021.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0022.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 18 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 18 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 18 16:01:12 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0023.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 18 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 18 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0024.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0025.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:22 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0026.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0027.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 19 16:02:24 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 19 16:02:24 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:24 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 19 16:02:24 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:24 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0028.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 19 20:00:41 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 19 20:00:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 19 20:00:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 20 08:06:03 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0029.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:03 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:04 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0030.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 12:01:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:42 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0031.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:37 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0032.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:38 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:34 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0033.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:35 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0034.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0035.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 16:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0036.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0037.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 22 08:02:30 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 22 08:02:31 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:31 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 22 08:02:31 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:31 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0038.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:42 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0039.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:00 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0040.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:00 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0041.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0042.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0043.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 16:01:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:27 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0044.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0045.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 24 12:02:21 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 24 12:02:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:21 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0046.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 12:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0047.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:08 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0048.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0049.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:48 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0050.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0051.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0052.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0053.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 26 08:04:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 26 08:04:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 26 08:04:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:04:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0054.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0055.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0056.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:41 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0057.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 27 08:05:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:05:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0058.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0059.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0060.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:04:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:04:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 28 08:05:03 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0061.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:03 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:03 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:04 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0062.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0063.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0064.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Jan 28 20:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0065.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0066.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0067.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0068.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 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 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 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 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:02 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 30 08:07:03 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 30 08:07:03 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:03 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 30 08:07:04 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:04 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:04 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:04 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0069.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:10 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:28 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0070.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:31 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0071.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 30 16:03:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:46 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0072.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 31 08:07:12 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 31 08:07:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 31 08:07:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0073.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:15 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 31 08:07:16 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:16 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 31 12:03:49 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0074.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:49 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 12:03:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 31 16:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 31 16:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 31 16:01:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:55 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0075.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0076.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Jan 31 20:00:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Jan 31 20:00:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Jan 31 20:00:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:08:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:08:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0077.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 1 08:09:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 1 08:09:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 1 08:09:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:19 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 1 12:02:19 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 1 12:02:19 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:19 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 1 12:02:20 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:20 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:20 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:20 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0078.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:21 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0079.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:54 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0080.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:45 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 2 08:11:07 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 2 08:11:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:07 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 2 08:11:07 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:08 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:08 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:08 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0081.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:10 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 2 12:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 2 12:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 2 12:02:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:24 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:24 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:24 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0082.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:26 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0083.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:57 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:58 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0084.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:27 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:29 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 3 08:10:32 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0085.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:32 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:32 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:33 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0086.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:15 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0087.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0088.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:29 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 4 08:06:30 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 4 08:06:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 4 08:06:30 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:31 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:32 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:32 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 4 08:06:36 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0089.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:36 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:37 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0090.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:17 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0091.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:00 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 4 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 4 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 4 20:00:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0092.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:46 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:00 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 5 08:07:04 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0093.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:05 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0094.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:19 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0095.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:57 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0096.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:44 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:19 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 6 08:11:22 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 6 08:11:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 6 08:11:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:23 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:23 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 6 08:11:36 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0097.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:36 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:36 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:36 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:38 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 6 08:11:39 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:40 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:11 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0098.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0099.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 6 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 6 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 6 20:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:50 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0100.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:22 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:24 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0101.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 7 08:17:35 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 7 08:17:35 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:35 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 7 08:17:37 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:37 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0102.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0103.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:57 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0104.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:57 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:18:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:18:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 8 08:19:09 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0105.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:09 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 8 08:19:10 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:11 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 8 08:19:11 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:11 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 8 12:02:42 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0106.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:42 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:42 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 12:02:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:43 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0107.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0108.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 9 08:07:45 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 9 08:07:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:45 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 9 08:07:45 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:46 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:46 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0109.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:51 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:26 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 9 12:02:30 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0110.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:30 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:30 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:30 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:31 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:03 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0111.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:04 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 9 20:00:54 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0112.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:56 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:14:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 10 08:14:53 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 10 08:14:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:14:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 10 08:14:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:14:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:14:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:14:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 10 08:15:18 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0113.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:18 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:18 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:18 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 08:15:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 08:15:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 10 08:15:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 10 08:15:20 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:20 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 10 08:15:20 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:23 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:02:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0114.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:02 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0115.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:52 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Feb 10 20:00:58 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Feb 10 20:00:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Feb 10 20:00:58 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:58 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0116.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:00:59 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 11 08:11:43 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 11 08:11:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:43 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 11 08:11:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:43 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:44 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:44 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0117.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 11 08:11:48 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:10 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0118.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:12 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0119.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:54 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0120.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sat Feb 11 20:00:48 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sat Feb 11 20:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:08 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 12 08:08:12 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0121.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:12 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:12 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:12 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 08:08:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:17 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0122.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:19 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0123.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0124.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:38 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 13 08:14:39 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 13 08:14:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:39 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 13 08:14:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:40 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0125.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 13 08:14:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 13 08:14:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:53 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 13 08:14:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:14:53 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 13 12:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 13 12:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:30 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 13 12:02:30 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:30 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:31 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:31 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0126.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:32 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0127.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:09 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0128.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:47 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:40 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 14 08:16:41 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 14 08:16:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:41 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 14 08:16:41 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:42 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:42 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0129.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:16:55 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:47 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0130.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:50 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0131.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:14 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:15 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:58 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0132.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:00:59 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:21:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 15 08:21:53 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 15 08:21:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:21:53 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 15 08:21:53 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:21:53 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:21:53 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:21:54 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 15 08:22:11 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0133.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:11 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:11 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:12 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:35 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 15 12:04:35 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 15 12:04:36 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:36 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 15 12:04:36 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:36 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:36 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:36 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 15 12:04:38 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0134.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:38 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:39 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 15 12:04:40 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:40 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 15 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 15 16:01:12 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0135.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:13 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0136.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:49 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:11:48 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Wed Feb 15 20:11:49 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Wed Feb 15 20:11:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:11:49 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Wed Feb 15 20:11:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:11:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:11:49 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:11:51 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Wed Feb 15 20:12:00 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0137.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:00 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:01 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:40:50 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Thu Feb 16 08:40:52 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Thu Feb 16 08:40:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:40:55 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Thu Feb 16 08:40:55 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:40:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:40:56 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:40:56 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Thu Feb 16 08:41:18 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0138.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:18 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Thu Feb 16 08:41:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Thu Feb 16 08:41:20 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:20 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Thu Feb 16 08:41:20 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:20 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Tue Apr 2 20:31:36 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CA9EAF8.A528E748@lemburg.com> Edwin Grubbs wrote: > > I am having a problem with DateTime incorrectly rounding the floating > point second value down 1/100 of second. > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from mx.DateTime import * > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > That's because 5.05 is really 5.0499999999999998. mxDateTime's repr() function truncates the seconds value to avoid accidental cases of a 60 reading when you really only have 59.6 seconds. Use now().second to access the true seconds value with full accuracy. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From egrubbs at rackspace.com Tue Apr 2 15:26:16 2002 From: egrubbs at rackspace.com (Edwin Grubbs) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] DateTime error rounding seconds In-Reply-To: <3CA9EAF8.A528E748@lemburg.com> Message-ID: On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > Edwin Grubbs wrote: > > > > I am having a problem with DateTime incorrectly rounding the floating > > point second value down 1/100 of second. > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from mx.DateTime import * > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > repr() function truncates the seconds value to avoid accidental > cases of a 60 reading when you really only have 59.6 seconds. > > Use now().second to access the true seconds value with > full accuracy. > > HTH, > The real problem with it, is that str() returns the truncated date just like repr(), and we are using str() to insert datetime fields. If you create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 database using its str() value, it is stored as 03:04:05.01. Then when you retrieve 03:04:05.01 from the database, the DateTime object shows it as 03:04:05.00. Then you cannot match the row that you just retrieved with its datetime column. How is the DateTime object supposed to be inserted and retrieved from the database? I understand that a float cannot represent most decimal values exactly, but truncating just increases the inaccuracy even though it might seem more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". -Edwin From sholden at holdenweb.com Wed Apr 3 08:25:36 2002 From: sholden at holdenweb.com (Steve Holden) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <025701c1db0a$a94dab00$d200000a@COMPUTER> ----- Original Message ----- From: "Edwin Grubbs" To: Sent: Tuesday, April 02, 2002 3:26 PM Subject: Re: [egenix-users] DateTime error rounding seconds > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > > > > > Python 2.2 (#1, Mar 13 2002, 12:34:11) > > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> from mx.DateTime import * > > > >>> DateTime(2002, 1, 2, 3, 4, 5.00) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.01) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.02) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.03) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.04) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.05) > > > > > > >>> DateTime(2002, 1, 2, 3, 4, 5.06) > > > > > > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > > > HTH, > > > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? > Isn't the *real* real problem (;-) i that you are using character fields to store date values? Normally one is supposed to use a timestamp or datetime field to store these values (if you store them as strings then equality is the only sensible test you can make. As datetime values you can also use <, >, BETWEEN, etc.). However, even this solution sometimes has pitfalls - stroing datetimes in either Access of SQL Server (I think the latter, but it's a long time ago) raies warnings abour field truncation, which you have to cure by removing any fractional seconds before storage. > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > Just as one asks for trouble by treating floats as exact, it's problematic to store date/time values as strings. If you DBMS has no date/time type, consider converting the dates to an appropriate numeric format. regards Steve From mal at lemburg.com Wed Apr 3 16:19:47 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: Message-ID: <3CAB0173.589E3584@lemburg.com> Edwin Grubbs wrote: > > On Tue, 2 Apr 2002, M.-A. Lemburg wrote: > > > Edwin Grubbs wrote: > > > > > > I am having a problem with DateTime incorrectly rounding the floating > > > point second value down 1/100 of second. > > That's because 5.05 is really 5.0499999999999998. mxDateTime's > > repr() function truncates the seconds value to avoid accidental > > cases of a 60 reading when you really only have 59.6 seconds. > > > > Use now().second to access the true seconds value with > > full accuracy. > > The real problem with it, is that str() returns the truncated date just > like repr(), and we are using str() to insert datetime fields. If you > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > database using its str() value, it is stored as 03:04:05.01. Then when you > retrieve 03:04:05.01 from the database, the DateTime object shows it as > 03:04:05.00. Then you cannot match the row that you just retrieved with > its datetime column. How is the DateTime object supposed to be inserted > and retrieved from the database? The database interface should use the C API for this. It preserves the accuracy all the way. If that's not an option, I'd consider using the tuple representation now().tuple() which mimics time.localtime(time.time()) (but with added seconds accuracy). > I understand that a float cannot represent most decimal values exactly, > but truncating just increases the inaccuracy even though it might seem > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". Hmm, one possibility would be to use rounding for all second values < 59.995 and apply truncation to all others. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From holtwick at spirito.de Thu Apr 4 10:07:47 2002 From: holtwick at spirito.de (Dirk Holtwick) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CABFBC3.5040405@spirito.de> Hi Marc-Andre, when do you plan to release the new versions of mxExperimental and mxBase? Maybe testing of the newer versions could become easier with a "beta testing" are on your website? I didn't find any bigger problems in the new version. Cheers, Dirk From mal at lemburg.com Thu Apr 4 13:53:59 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC30C7.3C581021@lemburg.com> Dirk Holtwick wrote: > > Hi Marc-Andre, > > when do you plan to release the new versions of mxExperimental and > mxBase? Maybe testing of the newer versions could become easier with a > "beta testing" are on your website? I didn't find any bigger problems in > the new version. I was too busy the last few weeks to work on this, but since you ask, I'll upload the latest betas today and let you know. FWIW, I'm especially interested in hearing about the changes to mxBeeBase -- it should work on Windows and Unix now and it supports large files (up to 4GB) on Unix machines which have this. If all works out, mxBeeBase would make a great alternative to the various DBM packages out there since it is self-contained and aims to be platform independent (both API and data file wise). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 17:38:16 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] New releases? References: <3CAB0173.589E3584@lemburg.com> <3CABFBC3.5040405@spirito.de> Message-ID: <3CAC6558.6CF10ABB@lemburg.com> Ok, I won't find time for the betas today. To not let you wait, here's something else: I updated mxCGIPython to now play nice with importing shared modules. This means that you can start using your favourite DateTime package with cgipython in CGI scripts ! Here's the new mxCGIPython version: http://www.egenix.com/files/python/mxCGIPython.html I've tested it with Python 2.1, but 2.2 should also work. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Apr 4 20:45:11 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:32:59 2006 Subject: [egenix-users] DateTime error rounding seconds References: <3CAB0173.589E3584@lemburg.com> Message-ID: <3CAC9127.60C3B1C8@lemburg.com> "M.-A. Lemburg" wrote: > > > The real problem with it, is that str() returns the truncated date just > > like repr(), and we are using str() to insert datetime fields. If you > > create a DateTime object for 03:04:05.02 and insert it into a Postgres 7 > > database using its str() value, it is stored as 03:04:05.01. Then when you > > retrieve 03:04:05.01 from the database, the DateTime object shows it as > > 03:04:05.00. Then you cannot match the row that you just retrieved with > > its datetime column. How is the DateTime object supposed to be inserted > > and retrieved from the database? > > The database interface should use the C API for this. It preserves > the accuracy all the way. If that's not an option, I'd consider using > the tuple representation now().tuple() which mimics > time.localtime(time.time()) (but with added seconds accuracy). > > > I understand that a float cannot represent most decimal values exactly, > > but truncating just increases the inaccuracy even though it might seem > > more coherent to have "2002-03-28 10:59:59.9999" truncated to "2002-03-28 > > 10:59:59.99" instead of rounded to "2002-03-28 11:00:00.00". > > Hmm, one possibility would be to use rounding for all second > values < 59.995 and apply truncation to all others. Ok, I've change this now to have str(DateTime(...)) round seconds to two decimal places with the exception of second values >=59.995 and <60.00. The latter are all mapped to 59.99. This may sound like a strange method, but in practice should enhance accuracy when interfacing with other storage mechanisms using string representations. If anyone needs the old behaviour, I'll add a compile time #define to switch back to the old behaviour. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From pramasub at bigmachines.com Thu Apr 4 20:15:27 2002 From: pramasub at bigmachines.com (Prathibha Ram) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] question Message-ID: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Hi all Since I have started using the new exgenix mx Base package, I keep getting compilation errors in import. I was using the previous version of the mx package and my import statement in files used to be import mx.DateTime. What should this be changed to since this is no longer recognized and I keep getting the compile error. Also now I get the following error Traceback (innermost last): File "", line 8, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in modinit File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle TypeError: copy_reg is not intended for use with classes can anyone suggest anything about the above error? Thanks very much for your input and time. Prathibbha I use jython in conjunction with java on an NT machine. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020404/edb2bf50/attachment-0139.htm From mal at lemburg.com Fri Apr 5 11:08:34 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> Message-ID: <3CAD5B82.B6267E0C@lemburg.com> > Prathibha Ram wrote: > > Hi all > > Since I have started using the new exgenix mx Base package, I keep > getting compilation errors in import. I was using the previous version > of the mx package and my import statement in files used to be import > mx.DateTime. What should this be changed to since this is no longer > recognized and I keep getting the compile error. > > Also now I get the following error > Traceback (innermost last): > File "", line 8, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > modinit > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > TypeError: copy_reg is not intended for use with classes > > can anyone suggest anything about the above error? The eGenix mx Tools only support CPython, not Jython. You probably can still use them with Jython if you hook JPE up to the Java VM, though, or interface to them via JNI directly. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ PS: Please don't post HTML messages to the list. Thanks. From mal at lemburg.com Fri Apr 5 23:21:29 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] question References: <000a01c1dc50$226b8250$320210ac@bigmachines.com> <3CAD5B82.B6267E0C@lemburg.com> <001101c1dcd9$345f0160$320210ac@bigmachines.com> Message-ID: <3CAE0749.77E43CE7@lemburg.com> Prathibha Ram wrote: > > Hi Mark: > I was already using the mx extension version(prior to 2.0.3) with jython1.5 > and it was fine. All I did was import the mx.DateTime package in my code. > Even now, the old version of the mx Extension package works fine with jython > 2.1 except that it gives the copy_reg error first time I invoke jython. You could probably use the Python code in the mxDateTime package, but you wouldn't have access to the two types defined in the C extension. Now, someone wrote a Python emulation for those two which now lives in mxDateTime/mxDateTime_Python.py but that file is not being actively maintained. > Do > you think if I go in for commercial support you would be able to configure > your mx Extension for jython2.1? Probably not all of them since some use third party C libs which are hard to rewrite in Python or Java. For mxDateTime, Brian Zimmer is working on an Java version. With funding, I could also bring the Python emulation of the mxDateTime extension back up-to-date and reenable it (see mxDateTime/__init__.py if you want to give it try with the old emulation). > The reason I am asking is that otherwise, I > will have to shelve all the extension packages that I have been using till > now. I might have to start using the time module in jython and write some py > files of my own for date manipulations. We'll figure out a way to let you continue your usage of mxDateTime in Jython :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Apr 5 23:23:01 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] question Message-ID: <3CAE07A5.2322636E@lemburg.com> Hi Mark: I was already using the mx extension version(prior to 2.0.3) with jython1.5 and it was fine. All I did was import the mx.DateTime package in my code. Even now, the old version of the mx Extension package works fine with jython 2.1 except that it gives the copy_reg error first time I invoke jython. Do you think if I go in for commercial support you would be able to configure your mx Extension for jython2.1? The reason I am asking is that otherwise, I will have to shelve all the extension packages that I have been using till now. I might have to start using the time module in jython and write some py files of my own for date manipulations. I will appreciate your reply. Thank you for your input and time. Prathibbha. ----- Original Message ----- From: "M.-A. Lemburg" To: "Prathibha Ram" Cc: Sent: Friday, April 05, 2002 12:08 AM Subject: Re: [egenix-users] question > > Prathibha Ram wrote: > > > > Hi all > > > > Since I have started using the new exgenix mx Base package, I keep > > getting compilation errors in import. I was using the previous version > > of the mx package and my import statement in files used to be import > > mx.DateTime. What should this be changed to since this is no longer > > recognized and I keep getting the compile error. > > > > Also now I get the following error > > Traceback (innermost last): > > File "", line 8, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 40, in ? > > File "/mach/jython-2.1/Lib/mx/DateTime/__init__.py", line 48, in > > modinit > > File "/mach/jython-2.1/Lib/copy_reg.py", line 16, in pickle > > TypeError: copy_reg is not intended for use with classes > > > > can anyone suggest anything about the above error? > > The eGenix mx Tools only support CPython, not Jython. You > probably can still use them with Jython if you hook JPE up > to the Java VM, though, or interface to them via JNI > directly. > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > PS: Please don't post HTML messages to the list. Thanks. > From mal at lemburg.com Sat Apr 6 00:53:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) Message-ID: <3CAE1CBC.B597D946@lemburg.com> Ok, I've finally found the time to wrap up the first betas for the two packages. Here they are (sorry, no time to sort these links): http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm and http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe Please have a look at the various documentation files for a list of changes. Most important are probably the enhanced mxBeeBase (BASE), the updated mxUID (EXP), better compile support for mxNumber (EXP) and the usual bunch of small bug fixes. Have fun, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Fri Apr 5 16:05:43 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE1FB6.35B3EE2C@noaa.gov> Marc, I'm having an access difficulty. When I click on a Windows link, here is the message: The requested URL /files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe was not found on this server. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 Jim.Vickroy at noaa.gov Fri Apr 5 16:12:16 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> Message-ID: <3CAE2140.799E1412@noaa.gov> OK, I waited for a few minutes and now I can access the links. Sorry about that, I guess I just tried too soon the first time. "M.-A. Lemburg" wrote: > Ok, I've finally found the time to wrap up the first betas > for the two packages. Here they are (sorry, no time to sort > these links): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py1.5.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1.zip > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-base-2.1.0b1-py2.0_1.i386.rpm > > and > > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.0.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.1.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py2.2.exe > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.1_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.0_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.zip > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.i386.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.tar.gz > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py1.5_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1-py2.2_1.src.rpm > http://www.egenix.com/files/python/egenix-mx-experimental-0.7.0b1.win32-py1.5.exe > > Please have a look at the various documentation files for > a list of changes. Most important are probably the enhanced > mxBeeBase (BASE), the updated mxUID (EXP), better compile > support for mxNumber (EXP) and the usual bunch of small > bug fixes. > > Have fun, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > ______________________________________________________________________ > Company & Consulting: http://www.egenix.com/ > Python 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 mal at lemburg.com Sat Apr 6 01:44:48 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE 2.1.0 (beta1) + EXPERIMENTAL 0.7.0 (beta1) References: <3CAE1CBC.B597D946@lemburg.com> <3CAE2140.799E1412@noaa.gov> Message-ID: <3CAE28E0.3AE4F5A4@lemburg.com> Jim Vickroy wrote: > > OK, I waited for a few minutes and now I can access the links. Sorry about that, I > guess I just tried too soon the first time. The upload took a little longer than expected ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From John.N.1 at bwc.state.oh.us Mon Apr 15 13:19:20 2002 From: John.N.1 at bwc.state.oh.us (John.N.1@bwc.state.oh.us) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve Message-ID: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> 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 Thanks for any help, john From bzimmer at ziclix.com Mon Apr 15 12:10:43 2002 From: bzimmer at ziclix.com (brian zimmer) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 Message-ID: <001f01c1e498$1b5064e0$7401a8c0@mountain> I am happy to announce the initial release of zxDateTime, a drop-in replacement for mxDateTime written in Java, has been made available today. The next planned version will include optimizations as well 100% API implementation (a couple methods are missing). I am particularly interested in getting feedback on the usefulness of this module as well as the porting of other CPython extensions written in C. The initial release can be found at: http://sourceforge.net/projects/zxpy/ The API for mxDateTime can be found at: http://www.egenix.com/files/python/mxDateTime.html Installation directions are included in the distribution. zxDateTime has been tested with Jython 2.1(+), mxDateTime 2.0.3 and JDK1.3.1. Other versions might work but I have not tested them as thoroughly/at all. thanks, brian ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting his work. pss: I'd like to thank the primary Jython developers for making the extending of Jython with Java so much fun :) From mal at lemburg.com Tue Apr 16 13:31:28 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] [ANN] zxDateTime 0.1 References: <001f01c1e498$1b5064e0$7401a8c0@mountain> Message-ID: <3CBBFD80.F129BB4E@lemburg.com> brian zimmer wrote: > > I am happy to announce the initial release of zxDateTime, a drop-in > replacement for mxDateTime written in Java, has been made available > today. Way cool ! > ps: I'd like to thank Marc-Andre Lemburg for his assistance in porting > his work. I'd like to thank you for taking the time to write this port and for making it available to the general public. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From maxm at mxm.dk Mon Apr 29 11:56:37 2002 From: maxm at mxm.dk (Max M) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 Message-ID: <3CCD0AC5.1030904@mxm.dk> I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, on which I have only a normal user account. I have copied the .tgz source file to a directory and typed: /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build And then it stops at: building 'mx.Number.mxNumber.mxNumber' extension gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/home/zope/Zope-2.5.1-linux2-x86/include/python2.1 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i586-2.1/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 Am I doing it wrong or am I missing a file? I am not too acustomed to Linux so please bear with me. The man page says that it's running gcc-2.95 regards Max M From mal at lemburg.com Mon Apr 29 12:24:00 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:01 2006 Subject: [egenix-users] Error building egenix-mx-experimental-0.6.0 References: <3CCD0AC5.1030904@mxm.dk> Message-ID: <3CCD1130.D10681DA@lemburg.com> Max M wrote: > > I am trying to build egenix-mx-experimental-0.6.0, on a Linux machine, > on which I have only a normal user account. I have copied the .tgz > source file to a directory and typed: > > /home/zope/Zope-2.5.1-linux2-x86/bin/python setup.py build Please try the lastest beta I posted here a couple of weeks ago (see the list archive for the URLs). The mxNumber build is broken in 0.6.0, but should be fixed in 0.7.0b1. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/