How to activate __future__ features in embedded Python?

Michael Hudson mwh at python.net
Wed Jan 30 10:19:01 EST 2002


Stefan Franke <franke at ableton.com> writes:

> 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



More information about the Python-list mailing list