> Does your version use the GMP library (optional in PARI).
> Does it support Windows? I couldn't tell if the PARI
> Windows distribution has GMP, but I suspect not since GMP
> doesn't support Windows.

No, I didn't try to use gmp. But this may be not a bad idea. I am
trying to compile gmp right now. I am also using Windows. Here there
are two ways to work. The first is cygwin. Actually the standard PARI
distribution uses cygwin. Problem is that in this case you must also
use cygwin version of Python. It is very easy in my case - I have a
full Cygwin system installed together with python, bash, gcc etc. It
is not bad actually - bash is much more powerful than cmd. And you can
start windows programs from bash, start cygwin problems from windows,
I mean it is having linux and windows simultaneously.

But if you are using windows python then you must compile everything
for windows because somehow cygwin1.dll (yes, just one dll is enough)
does not work with windows python. So there are no problems with
compiling my module on windows provided you managed to compile PARI
which does not use cygwin. It is possible (you have to use mingw32 +
msys to compile and remove '#define UNIX' from paricfg.h), I tried
this and it seem to work. Personally I don't like it so much because
on windows python does not support colors, everything is black and
white. There is a thing called ipython (google it) which has some
colors. So this may be an option. So there should be no problems to
make the whole thing purely windows. I haven't tried to compile GMP
under mingw. But I think there should be no problems as well. This is
just mathematical library, it shouldn't use too much from the system.

> >
> > There are two special difficulties you may notice about python. The
> > first one is the power operation. In python it is '**', whereas '^' is
> > reserved for the bitwise xor. I made some little changes to the python
> > source so that '^' and '^=' now work as power, and '^^' and '^^=' work
> > as xor if you still want to use it.
>
> Oh, dear.
>
> > This is done by modifying about 30
> > lines of source code in several files: Include/token.h, Modules/
> > parsermodule.c, Parser/tokenizer.c, Python/ast.c, Grammar/Grammar.
>
> Am I gonna have to re-compile Python?

Yes, unfortunately this hack with '^' needs python to be recompiled.
You see, the problem is not just with symbol. The problem is that
normally ^ has precedence less than +. For example even if you
redefine '^' to be the power operation the following expression 2*2^2
will be 16, not 8 as you expect.

>
> That's imposible for ordinary Windows users.
>

Well, this should not be impossible. I haven't tried, but I've heard
that the free version of Microsoft Visual C++ is enough
(http://msdn2.microsoft.com/en-us/express/aa975050.aspx).

> Are you going to make a binary Windows distribution?

Definitely I can make a binary distribution as well. Just need some time :)

>
> If not, it may as well be on the far side of the moon for
> all the good it would be to me.
>

So when I make a binary distribution for Windows I can upload it
somewhere and post a link.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to