En Mon, 07 Sep 2009 18:55:11 -0300, Torsten Mohr <tm...@s.netic.de>
escribió:

So i'd like to write a python module in C (which i did before some times).

But i'm not sure how i can create a module in a way that i can later do:

import measurement
import measurement.adc
import measurement.adc.channels
import measurement.pwm

What do i need to do to create submodules within the initialisation code
of a python module written in C?

I think it's easier to write a wrapper module in Python. See the xml.etree
package; the cElementTree.py Python module just contains "from
_elementtree import *" (_elementtree being a C extension)

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to