The official documentation covers this in some detail:
http://docs.python.org/extending/
http://docs.python.org/c-api/

Cython is an alternate implementation of Python. It's more of a blending of 
Python and C. It won't, in general, run Python source code or your favorite 
third-party library. To run C alongside Python, you need to use the API.

You can interface Cython with straight C, of course, but not in a way that 
will work with the standard interpreter.

Cheers


On Monday 17 September 2012, Bala subramanian wrote:
> Friends,
> I code in python and so far able to write simple scripts for my needs.
> Now i want to try the combination of c and python.
> 
> 1) could someone please suggest me some good documentation on how
> python and C can be combined. Some tutorials with simple examples.
> 
> 2) If i know that a specific part (loop in my case) within my python
> script consumes more processing time, is it possible to implement/use
> 'c' only for that part. Precisely using C within python ? Any link for
> documentation on such implementation would be of great help to me.
> 
> Thanks,
> Bala
> _______________________________________________
> Tutor maillist  -  [email protected]
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to