source: trunk/essentials/dev-lang/python/Demo/embed/demo.c@ 3437

Last change on this file since 3437 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 1.6 KB
Line 
1/* Example of embedding Python in another program */
2
3#include "Python.h"
4
5void initxyzzy(void); /* Forward */
6
7main(int argc, char **argv)
8{
9 /* Pass argv[0] to the Python interpreter */
10 Py_SetProgramName(argv[0]);
11
12 /* Initialize the Python interpreter. Required. */
13 Py_Initialize();
14
15 /* Add a static module */
16 initxyzzy();