Issue 4586: "Extending Embedded Python" documention uses removed Py_InitModule function (original) (raw)

Created on 2008-12-07 22:42 by blakemadden, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg77273 - (view) Author: blake madden (blakemadden) Date: 2008-12-07 22:42
On the page: http://docs.python.org/3.0/extending/embedding.html#extending-embedded-python Note that the function "Py_InitModule" is used. From what I can tell, this function no longer exists and regrettably I can't figure out how to get "PyModule_Create" to work in its place.
msg77274 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-12-07 22:46
Should be fixed in r67655.
msg77304 - (view) Author: blake madden (blakemadden) Date: 2008-12-08 13:35
I am afraid that the webpage that I mentioned still uses "Py_InitModule", I just checked. How do I get embedding to work? Thanks.
msg77305 - (view) Author: blake madden (blakemadden) Date: 2008-12-08 13:40
I took a look at the rst file in your comments and I tried that example (which uses PyModule_Create), but I am sorry to say that it doesn't work. It says "no module named emb". Are we sure that PyModule_Create is all that needs to be called?
msg77448 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-12-09 20:59
You are probably looking at http://docs.python.org/3.0/ still and that only updates when a new release happens. To see the in-development docs look at http://docs.python.org/dev/3.0/ . And the problem with the docs and its new PyModule_Create() usage is being worked on in Issue4592 (already have a history over there so not reopening this one).
msg77457 - (view) Author: blake madden (blakemadden) Date: 2008-12-09 21:50
"You are probably looking at http://docs.python.org/3.0/ still and that only updates when a new release happens." Didn't you just have a new release, Python 3? I thought the website said it was a stable release? The production help for Python 3 is using Py_InitModule, which doesn't even exist in the production release of Python 3. I stopped looking at that help when I figured that out, and after that I have been looking at the DEV help which (as you mentioned) does not work for other reasons.
msg77459 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-12-09 22:08
Brett: > You are probably looking at http://docs.python.org/3.0/ still and that > only updates when a new release happens. That is not true, I want it to update continually, like the 2.6 ones, and have already contacted Neal about it. Blake: > Didn't you just have a new release, Python 3? I thought the website > said it was a stable release? The production help for Python 3 is using > Py_InitModule, which doesn't even exist in the production release of > Python 3. Yes. The production help is not without errors, since many changes to the Python 3 branch haven't been properly documented. But as said, when all is set up correctly, the docs.python.org/3.0 docs will update and correct errors such as this one.
History
Date User Action Args
2022-04-11 14:56:42 admin set github: 48836
2008-12-09 22:08:56 georg.brandl set messages: +
2008-12-09 21:50:47 blakemadden set messages: +
2008-12-09 20:59:37 brett.cannon set nosy: + brett.cannonmessages: +
2008-12-08 13:40:49 blakemadden set messages: +
2008-12-08 13:35:34 blakemadden set messages: +
2008-12-07 22:46:04 georg.brandl set status: open -> closedresolution: fixedmessages: +
2008-12-07 22:42:21 blakemadden create