Lars Friedrich wrote:
>> In this case, you're writing a dll that understands PyObjects (or, I 
>> assume, a particular PyObject -- a numarray). Why not just forget ctypes 
>> and write a regular old extension?
> good point. I am relatively new to Python. The first thing I did was
> trying to write a regular extension. The problem is, that I *have to*
> use a windows-machine. And at the moment, only Visual C++ 6.0 is
> available here. The problem is that for a regular extension, Python and
> the extension need to be compiled by the same compiler AFAIK.

That's mostly true. You have three options:

1) re-compile python yourself -- but then you'd also have to re-compile 
all the other extensions you use!

2) You can also use MingGW to compile extensions -- it takes a bit of 
kludging, but it can be done, and works fine once you've got it set up. 
Google will help you figure out how -- it's been a while since I've done it.

I have to say that I find it ironic that you can use MinGW, but not 
other versions of the MS compiler!

3) MS distributes a command line version of their compiler for free that 
can be used. Again, google should help you find out how to do that.


However, as other posters mentioned, you can use ctypes as it was 
intended with numpy -- that may be the way to go

-Chris






-- 
Christopher Barker, Ph.D.
Oceanographer
                                                
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to