Getting python -m module to work for a module implemented in C
<p>I have a pure C module for Python and I'd like to be able to invoke it using the <code>python -m modulename</code> approach.  This works fine with modules implemented in Python and one obvious workaround is to add an extra file for that purpose.  However I <strong>really</strong> want to keep things to my one single distributed binary and not add a second file just for this workaround.</p>

<p>I don't care how hacky the solution is.</p>

<p>If you do try to use a C module with -m then you get an error message <code>No code object available for &lt;modulename&gt;</code>.</p>
