Why can't I get embedded Python to work in a C++ / MFC application with Python functions longer than one line? -
i trying embed python 3.4 in c++ / mfc / windows application.
i trying use pyrun_simplestring import python module, like:
pyrun_simplestring("import testmod") is have. here testmod.py:
def hello(): return 5; def four(input): print(input * 4); when import (via pyrun_simplestring), pyrunsimplestring returns 0 (good), when change testmod.py to:
def hello(): c = 5 return c; def four(input): print(input * 4); i return value of -1...something went wrong. hit breakpoint put in
static void print_error_text(pyobject *f, int offset, pyobject *text_obj) which in pythonrun.c
okay, 1 seems pretty strange me. ideas?
Comments
Post a Comment