Using Python for Science: Cygwin versus Native

eric jones eric at enthought.com
Sun Sep 23 14:18:01 EDT 2001


Hey gb,

Have you looked at SciPy (www.scipy.org)?  It is a relatively new package
that offers much of the capabilities of Matlab using Python.  I think it may
provide many of the
functions you were hoping to get from the Intel Performance Library. And
many of the routines
(fft, linear solvers, etc) are based on some of the fastest libraries out
there (fftw, ATLAS), so
you'll get good performance. (get the CVS for the linear algebra stuff which
was recently added).

SciPy also includes decent graphics capabilities, although not up to Matlab
standards yet.  It
is, however quite usable now for daily plotting and will continue to
improve.  You can see
if it covers your needs by looking here:

   http://www.scipy.org/site_content/tutorials/plot_tutorial

As far as your question about which version of Python to use, they have been
interchangable
in my experience.  On windows, we build the SciPy extensions using gcc, even
when Python
was built with VC++ (ActiveState or the standard Python distribution).
There is a little
extra work to process the libpython.lib and libpython.dll to get a usable
libpython.a for gcc
to link against (see
http://scipy.net/cgi-bin/viewcvs.cgi/scipy/setup.py?rev=1.56&content-type=te
xt/vnd.viewcvs-markup in function build_import_library() for details), but,
once
this is done, your set.  We use mingw32 instead of cygwin, so I'm not sure
if there are issues
associated with that.

Good luck with your conversion to Python,

see ya,

eric

<gb at cs.unc.edu> wrote in message news:ug09frw8y.fsf at cs.unc.edu...
> I'm trying to switch from Matlab to Python + Numeric for my research
> work. The number of choices required is bewildering.
>
> On the Windows platform I can choose between two versions of Python,
> native win32 and cygwin. They are both fine for straight Python
> programming but when it comes to extensions they both appear to have
> weaknesses.
>
> For example, using the Cygwin package I have successfully built PyGist
> which runs fine with either the X-Win32 server or with XFree86. PyGist's
> plotting capability is really nice. I think I'll like it as a
> substitute for the VERY nice plotting capabilities of Matlab.
>
> Unfortunately using the Cygwin package appears to prohibit access to
> Windows DLL's such as the Intel Performance Libraries for signal
> processing and image processing.
>
> Question 1: Is there a way to access Windows DLL's and/or .obj files
> from the Cygwin hosted Python?
>
> On the other hand, the native win32 hosted python provides really nice
> access to the underlying system and to dll's. It also has a number of
> nice GUI packages available for it.
>
> Unfortunately porting the X11-based PyGist will be a load of work and
> I don't see an Xlib implementation for use outside of Cygwin.
>
> Question 2: Is there an Xlib library for Native Win32? I'd be happy to
> use the mingwin version of gcc. Then perhaps I could port PyGist to
> run in the native Python implementation.
>
> Thanks for any pointers.
> gb





More information about the Python-list mailing list