Calling C++ from Python

Rbtns rbtns082484 at hotmail.com
Fri Aug 17 10:30:29 EDT 2001


How would I call a C++ object from Python?

I have a file of something like:

#include <iostream.h>
int main()
{
  cout <<"I need this to work\n";
  return 0;
}

and I want to display my C++ program output from within a python
program. Do I create an object of the C++ program, and therefore would
it need to be in a class?  How do I do this if I don't want the program
in a class?  How do I import the C++ file?




More information about the Python-list mailing list