Read Matlab files with Python and Numeric?

nmw at nmw at
Mon Sep 24 18:03:40 CEST 2001

I've had a few requests for this, so I've tarballed the source and put it on
our FTP server. It's part of a much, much larger project, but I've extracted
the relevent bits and put them together in the tarfile.

You can get the tarball from

To build the module extract the tarball - it will create a directory called
matfile containing the source. Edit the Makefile and change the location
of the Python and Numerc header files and libraries for your system, the
macros which need changing are PYTHON_INLUCDE and PYTHON_LIBDIR and

Type "make" and it should build the matfile library first and then the

Oh, BTW, I should say that this is set up for Linux. No-one has mentioned
environment. For other *NIX systems it will be necessary to change some
of the compiler/linker options for building and naming shared objects.
I don't have a clue what would be necessary for a Windows environment.

Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK 
E-mail :    nmw at 
Phone :     +44 (0)116 2523568, Fax : +44 (0)116 2523555

More information about the Python-list mailing list