[sorry if this is a repost] Doing Py_Initialize(); PyRun_SimpleString("from __future__ import generators, division\n"); doesn't seem to affect subsequent PyRun_String() calls.