Jump to: navigation, search

Other languages:English 100% • ‎русский 100%

Substitute advertising banner:

C++ Python
class MyClass
std::string m_msg;
void say()
std::cout << m_msg << '\n';
MyClass(const char *msg)
m_msg = msg;
>>> c = MyClass("Hello world!")
>>> c.say()
Hello world!

Pyhrol is:

  • bridge between C++ and Python
  • one way bridge, from C++ to Python only
  •, pyhrol.h, tests, examples and this site
  • thing, imprisoned solely under Python 2.x
  • honest open source software

Pyhrol is not:

  • magic button, it requires at least declare objects and a little bit of programming
  • thing that supports Python 3.x


Key Features

  • arguments/return values ​​of the function/method introduced by simply turning in macro as an argument
  • list of keywords generated automatically; it bases on variables names
  • help messages about arguments/return values generated automatically
  • help messages tuned on the fly by printf-like directives
  • there is instrument to see help on methods that not supported by native help system
  • help messages includes default ardumentvalues
  • calls tracing


Documentation is online only and its structure is:

Theory Practice
  • Examples — collection of more than 40 pairs of C++/Python files with descriptions; from simple to complex
  • SourcesDoxygen-generated tables & diagrams

As we know, the theory is inseparable from the practice, so the above pages abundantly refer to each other.

There is no start no end in documentation

Get it


About project

Pyhrol rewritten twice during the last five years. It costs about a half person-year. Author, tester, writer and sponsor coexist in one physical person. Short-term plans:

  • documentation localisation
  • support of Python 3.x


Same named electronic mailbox at rambler dot ru