
Hello All,
Is there any tutorial I can read beside manual?
Regards, Emeka

On May 24, 2010, at 11:18 AM, Emeka wrote:
Hello All,
Is there any tutorial I can read beside manual?
You mean besides the tutorial that's linked to from the main page of
the Python documentation?
http://docs.python.org/extending/index.html
The tutorial is sparse, like a lot of the documentation for the C
interface. When I was writing my modules I looked at the source of
other modules (some in the standard library, some 3rd party) to see
how they did the things I wanted to do.
Hope this helps Philip

Along these same lines, it can also be useful to take some Python code, run it through Cython [1] or Pyrex [2], and look at the generated C source code. I'm not trying to say they generate perfect code -- but I find it's often faster to check out generated source than it is to find the appropriate entry in the reference manual, or use it to figure out *where to look* in the reference manual, especially before you know exactly what you're looking for. ;)
-cc
[1] http://www.cython.org [2] http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/

Dne 24.5.2010 17:18, Emeka napsal(a):
Maybe simple real project could help: http://ginstrom.com/code/subdist.html (Quick Links -> installer package) I'm not author.
Regards
Vojtěch Rylko vojta.rylko@seznam.cz
Czech Republic

On May 24, 2010, at 11:18 AM, Emeka wrote:
Hello All,
Is there any tutorial I can read beside manual?
You mean besides the tutorial that's linked to from the main page of
the Python documentation?
http://docs.python.org/extending/index.html
The tutorial is sparse, like a lot of the documentation for the C
interface. When I was writing my modules I looked at the source of
other modules (some in the standard library, some 3rd party) to see
how they did the things I wanted to do.
Hope this helps Philip

Along these same lines, it can also be useful to take some Python code, run it through Cython [1] or Pyrex [2], and look at the generated C source code. I'm not trying to say they generate perfect code -- but I find it's often faster to check out generated source than it is to find the appropriate entry in the reference manual, or use it to figure out *where to look* in the reference manual, especially before you know exactly what you're looking for. ;)
-cc
[1] http://www.cython.org [2] http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/

Dne 24.5.2010 17:18, Emeka napsal(a):
Maybe simple real project could help: http://ginstrom.com/code/subdist.html (Quick Links -> installer package) I'm not author.
Regards
Vojtěch Rylko vojta.rylko@seznam.cz
Czech Republic
participants (4)
-
Craig Citro
-
Emeka
-
Philip Semanchuk
-
Vojtěch Rylko