python / cpython

The Python programming language
https://www.python.org
Other
62.28k stars 29.92k forks source link

C-API Pure Embedding enhancement #68840

Open d8663452-dfe6-4e90-b529-56c9507b3575 opened 9 years ago

d8663452-dfe6-4e90-b529-56c9507b3575 commented 9 years ago
BPO 24652
Nosy @vstinner

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = None created_at = labels = ['type-bug', '3.8', '3.9', '3.10', 'expert-C-API', '3.7', 'docs'] title = 'C-API Pure Embedding enhancement' updated_at = user = 'https://bugs.python.org/JustinHuang' ``` bugs.python.org fields: ```python activity = actor = 'vstinner' assignee = 'docs@python' closed = False closed_date = None closer = None components = ['Documentation', 'C API'] creation = creator = 'Justin Huang' dependencies = [] files = [] hgrepos = [] issue_num = 24652 keywords = [] message_count = 1.0 messages = ['246847'] nosy_count = 3.0 nosy_names = ['vstinner', 'docs@python', 'Justin Huang'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue24652' versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10'] ```

d8663452-dfe6-4e90-b529-56c9507b3575 commented 9 years ago

From the example in here:

https://docs.python.org/2/extending/embedding.html#pure-embedding

when directly using the example (compiling and trying with external file etc.) it doesn't work right away. Instead an extra line:

    PySys_SetArgv(argc, argv);

must be added to get it to work.