Opened 13 years ago
Closed 13 years ago
#3310 closed Bugs (duplicate)
Why hasn't Ticket #1890 (1.35) been dealt with? It is still current: RE: boost::python embedding tutorial.
Reported by: | Owned by: | Dave Abrahams | |
---|---|---|---|
Milestone: | Boost 1.40.0 | Component: | python USE GITHUB |
Version: | Boost 1.39.0 | Severity: | Problem |
Keywords: | embedding tutorial | Cc: |
Description
Ticket #1890 is 15 months old. The "python embedding tutorial" is still screwed up ("1890" was at version 1.35). There are a host of blog entries on the web about this problem (and essentially no fixes, and few new boost-users would understand enough to get through this problem): basically on the webpage: http://www.boost.org/doc/libs/1_39_0/libs/python/doc/tutorial/doc/html/python/embedding.html
object ignored = exec("hello = file('hello.txt', 'w')\n"
"hello.write('Hello world!')\n" "hello.close()", main_namespace);
should be:
object ignored = exec("hello = file('hello.txt', 'w')\n"
"hello.write('Hello world!')\n" "hello.close()", main_namespace, main_namespace);
As described in ticket #1890.
This cost me > 2 hours, and I could have written my python interface from C++ using calls to "extern C" python API in significantly less time than that (and I haven't even seen the API before). Clearly a better default parameter setting for exec's parameter "local" would be the incoming value of "global"? -- Thanks! --
If the old ticket was ignored for 15 months, opening a new one isn't likely to do much better. Please don't create duplicate tickets. Anyway, I've posted to C++ sig about this issue, so hopefully it should get fixed soon.