File: python.cxx

package info (click to toggle)
pycxx 5.3.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 460 kB
  • ctags: 1,131
  • sloc: cpp: 2,148; makefile: 82; python: 68; sh: 9; ansic: 8
file content (16 lines) | stat: -rw-r--r-- 398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Minimal main program -- everything is loaded from the library */

#include "Python.h"
#include <iostream>

extern "C" int Py_Main(int argc, char** argv);
extern "C" void initexample();
extern "C" void Py_Initialize();
int
main(int argc, char** argv)
	{
	std::cout << "Greetings. Type from example import *; test()" << std::endl;
	Py_Initialize();
	initexample();
	return Py_Main(argc, argv);
	}