Hybrid C module + Python module (namespaces) #16649
Unanswered
purewack
asked this question in
Core Development
Replies: 1 comment 1 reply
-
Can't you just create module _modtest with the c code in it, and then have modtest.py be
This is how many of the main python library modules are handled, with low-level modules prefixed with '_'. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I there a way to write part of a custom module in C and then append Python defined functions to it during the build process using something in the form of frozen bytecode?
Example:
Suppose you have two files:
modtest.c
: defines a function calledhelloFromC()
modtest.py
: defines a function calledhelloFromPython()
The result I'm trying to achieve is something like:
Essentially allowing to bundle modules under one 'namespace'
Beta Was this translation helpful? Give feedback.
All reactions