dos
dos

Reputation: 135

How would I use Python class definitions for a C++ project

I'm having long lists of networking class definitions for C structs in python. What would be the best way to use them in C++?

Is there a parser I could use that exports C++ classes? Is a framework wrapper like Boost, that is quick enough to use it for tcp connection handling? Other suggestions?

Upvotes: 0

Views: 89

Answers (1)

aknuds1
aknuds1

Reputation: 67997

You could embed the Python parser into your C++ program in order to load the Python classes directly, or write a Python program to generate C++ equivalents to these Python classes. Read about embedding Python 3.x here or 2.x here.

Upvotes: 1

Related Questions