How to make Python Extensions for Windows for absolute beginners
Posted
by JR
on Stack Overflow
See other posts from Stack Overflow
or by JR
Published on 2010-03-23T20:21:17Z
Indexed on
2010/03/23
20:23 UTC
Read the original article
Hit count: 680
Hello:
I've been looking around the internet trying to find a good step by step guide to extend Python in Windows, and I haven't been able to find something for my skill level.
let's say you have some c code that looks like this:
#include <stdio.h>
#include <math.h>
double valuex(float value, double rate, double timex)
{
float value;
double rate, timex;
return value / double pow ((1 + rate), (timex));
}
and you want to turn that into a Python 3 module for use on a windows (64bit if that makes a difference) system. How would you go about doing that? I've looked up SWIG and Pyrex and in both circumstances they seem geared towards the unix user. With Pyrex I am not sure if it works with Python 3.
I'm just trying to learn the basics of programing, using some practical examples.
Lastly, if there is a good book that someone can recommend for learning to extend, I would greatly appreciate it.
Thank you.
© Stack Overflow or respective owner