00001 #include "PyObjectPlus.h"
00002 #include "EmbeddedClass.h"
00003
00004 extern "C" void initEmbeddedClass(void);
00005
00006 void main(int argc, char **argv)
00007 {
00008 int sizeemb = sizeof(EmbeddedClass);
00009 int sizepy = sizeof(PyObjectPlus);
00010
00011 Py_SetProgramName(argv[0]);
00012
00013
00014 Py_Initialize();
00015
00016
00017 initEmbeddedClass();
00018
00019
00020
00021
00022
00023 PySys_SetArgv(argc, argv);
00024
00025
00026 printf("Hello, brave new world\n\n");
00027
00028
00029
00030
00031 PyRun_SimpleString("import EmbeddedClass\n");
00032
00033 PyRun_SimpleString("N1 = EmbeddedClass.new(\"objname\")\n");
00034 PyRun_SimpleString("N1.PrintHello()\n");
00035 PyRun_SimpleString("N1.bagger.python = 10\n");
00036
00037
00038
00039 Py_Finalize();
00040
00041
00042 printf("\nGoodbye, cruel world\n");
00043 }