Doing
Py_Initialize();
PyRun_SimpleString("from __future__ import generators, division\n");
doesn't seem to affect subsequent PyRun_String() calls.
> [sorry if this is a repost]
Don't think so.
> Doing
>
> Py_Initialize();
> PyRun_SimpleString("from __future__ import generators, division\n");
>
> doesn't seem to affect subsequent PyRun_String() calls.
You need PyRun_SimpleStringFlags.
Cheers,
M.
--
It's actually a corruption of "starling". They used to be carried.
Since they weighed a full pound (hence the name), they had to be
carried by two starlings in tandem, with a line between them.
-- Alan J Rosenthal explains "Pounds Sterling" on asr
Ahh, thanks. What I actually needed was PyRun_StringFlags on each
call.
Unluckily CO_GENERATOR_ALLOWED and CO_FUTURE_DIVISION
are not declared publically by Python.h.
Stefan
> Unluckily CO_GENERATOR_ALLOWED and CO_FUTURE_DIVISION
> are not declared publically by Python.h.
Really? Oh well. They're in compile.h, or you could call
PyRun_SimpleStringFlags("from __future__ import whatever", &flags);
and then reuse the same flags for every call (I think this will work,
not sure sorry).
Cheers,
M.
--
I also feel it essential to note, [...], that Description Logics,
non-Monotonic Logics, Default Logics and Circumscription Logics
can all collectively go suck a cow. Thank you.
-- http://advogato.org/person/Johnath/diary.html?start=4