Skip to content

Hybrid C module + Python module (namespaces) #16649

Discussion options

You must be logged in to vote

Can't you just create module _modtest with the c code in it, and then have modtest.py be

from _modtest import helloFromC

def helloFromPython():
   print("Hello")

This is how many of the main python library modules are handled, with low-level modules prefixed with '_'.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@purewack
Comment options

@purewack
Comment options

Answer selected by purewack
Comment options

You must be logged in to vote
1 reply
@purewack
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants