about presicion

mensanator at aol.com mensanator at aol.com
Tue Aug 31 12:36:11 EDT 2004


Alex Martelli wrote:
> mensanator at aol.com <mensanator at aol.com> wrote:
>    ...
> > > > I just tried it and found out it's not compatible with gmpy.
> > >
> > > By "it" do you mean Decimal, or Python 2.4 alpha 2?
> >
> > By "it", I meant gmpy 1.0 and Python 2.4. Trying to import the
> > module says it can't use the Python23.dll.
>
> _Any_ binary extension Python module compiled for Python 2.3 cannot
even
> load (on Windows) with Python 2.4 -- this has always been true on
> Windows between any two releases of Python and will presumably
continue
> to be so for the foreseeable future.

What I meant was the OP can't compare Decimal and gmpy unless he has
a version of gmpy that runs in 2.4. Or has a version of Decimal that
runs in 2.3.

>
> This doesn't mean that Python 2.4 "is not compatible with gmpy" or
> viceversa: it just means you obviously need to use a gmpy binary (pyd
> file) compiled for the version of Python you're using.  Just as it
would
> be the case for any other binary extension module whatsoever.

I didn't mean it wasn't compatible. I meant you can't use the
2.3 version of gmpy in the 2.4 alpha that's currently available,
so I can't experiment with 2.4 because all my interesting programs
are dependant on gmpy. Not everyone is a professional software
developer, some of us ignorant users need to be told that.

>
> Unfortunately, compiling any binary extension module on Windows for
> Python 2.4 requires Microsoft's very latest C++ compiler -- I do not
own
> a copy, nor do I have any PC normally running Windows XP, which is
> required to run that compiler.  Until Pyhon 2.3, I made do with a
> Windows 98 session running under win4lin on one of my Linux machines,
> and good old Microsoft Visual C++ 6 -- but such limited resources are
> not sufficient any longer to compile Python binary extension modules
for
> Python 2.4.  Since in terms of income-making (as well as leisure;-) I
> work by now only on MacOSX, Linux, and OpenBSD machines, I am not
going
> to buy a PC loaded with Microsoft software just to be able to donate
> precompiled Python binary extension modules to Windows users.

How feasible is it that the end user could compile it himself?
Would the command line c compiler from the MS SDK suffice or do you
have to purchase the full .NET package? Would the source files need
a lot of tweaking?

>
>
> > > I think gmpy should
> > > build happily with the latter,
> >
> > I'm using the pre-built Windows binary distribution. I wouldn't
> > know how to re-build it. I assume that when Python 2.4 is final,
> > I newer compatible version of gmpy will become available.
>
> Not by magic -- I hope somebody out there owns all the needed
Microsoft
> software and is interested in compiling gmpy for Windows under Python
> 2.4 and making it available, but it won't be me.

Unfortunately, us ignorant end users depend on the magic that is
supplied by others. But that doesn't mean we're unwilling to help.
I had no clue that there won't be any more Windows gmpy updates
unless someone volunteers to help.

I've got an XP machine and given a choice between abandoning Python
completely and getting a copy of the MS compiler...

Of course, I realize that handing someone a box of wrenches doesn't
make them a mechanic. But we always have this newsgroup. I would
rather try and fail than see gmpy whither away from lack of interest.

>
>
> > > and interoperate sensibly with Decimal
> > > anyway -- as gmpy's author I'd be quite happy to fix gmpy if it's
> > broken
> > > in either respect.
> >
> > Were you aware that there is apparently a memory leak in the
> > gmpy.divm() function? Calling it several million time caused my
> > computer to run out of virtual memeory. Luckily, I was able to
> > work around it using the gmpy.invert() which didn't consume any
> > memory regardless of how many times it was called.
>
> No, I was not aware of that -- I'll look into it, thanks.
> 
> 
> Alex




More information about the Python-list mailing list