README 1.6 KB

123456789101112131415161718192021222324252627282930
  1. PyCXX is designed to make it easier to extend Python with C++
  2. CXX/Objects is a set of C++ facilities to make it easier to write Python
  3. extensions. The chief way in which PyCXX makes it easier to write Python
  4. extensions is that it greatly increases the probability that your program
  5. will not make a reference-counting error and will not have to continually
  6. check error returns from the Python C API. CXX/Objects integrates Python
  7. with C++ in these ways:
  8. + C++ exception handling is relied on to detect errors and clean up. In a
  9. complicated function this is often a tremendous problem when writing in C.
  10. With PyCXX, we let the compiler keep track of what objects need to be
  11. dereferenced when an error occurs.
  12. + The Standard Template Library (STL) and its many algorithms plug and
  13. play with Python containers such as lists and tuples.
  14. + The optional CXX/Extensions facility allows you to replace the clumsy C
  15. tables with objects and method calls that define your modules and
  16. extension objects.
  17. The original source will install CXX source code needed to help building
  18. python/C++ extension under /usr/share/python2.6/CXX which is a standard
  19. Debian directory. As Slackware does not have /usr/share/python2.6, I
  20. patched the installer to use /usr/share/CXX in order to follow the style of
  21. stock python packages like pygobject or pygtk. Be aware, though, that
  22. python packages that will use PyCXX will probably look for the needed files
  23. under the Debian standard path! You should investigate if their setup.py
  24. accept any switch to setup a different search path otherwise you will have
  25. to patch them.
  26. This requires pysetuptools.