Boost logo

Boost Users :

From: Kripken (kripkensteinr_at_[hidden])
Date: 2008-08-03 07:16:42


Hello,

I am unable to get the boost:python embedding tutorials to work. I have
the exact same problems as in this unanswered post:

http://www.nabble.com/boost.python-embedding-tutorial-doesn%27t-work---td17627559.html

Basically, commands like this

        python::object ignore = python::exec("print len([1,2,3])",
main_namespace);

fail with

   Traceback (most recent call last):
     File "<string>", line 1, in <module>
   TypeError: 'NoneType' object is unsubscriptable

whereas simpler commands like this do work:

        python::object ignoreme = python::exec(python::str("print 5"),
main_namespace);

Similar problems occur with eval instead of exec, for some uses the
error is instead

   TypeError: 'NoneType' object does not support item assignment

If it's important, I am running Ubuntu 8.04, Python is 2.5.2, Boost is 1.34.1.

Thanks in advance for any tips.

- Kripken


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net