File: class/Workbook/Examples/Lecture16/codestring2.c
#include "pyembed.h" #include <stdio.h> main() { char *cstr; int err = Run_Codestr( PY_EXPRESSION, /* expr|stmt? */ "upper('spam') + '!'", "string", /* code,module */ "s", &cstr); /* expr result */ printf("%s\n", (!err) ? cstr : "Can't run string"); }