i don't know why swig wouldn't create it?
i found this on the swig python website:
Another possible error is the following:
import example
Traceback (most recent call last):
File "", line 1, in ?
ImportError: dynamic module does not define init function (init_example)
This error is almost always caused when a bad name is given to the shared object file. For example, if you created a file example.so instead of _example.so you would get this error. Alternatively, this error could arise if the name of the module is inconsistent with the module name supplied with the %module directive. Double-check the interface to make sure the module name and the shared object filename match. Another possible cause of this error is forgetting to link the SWIG-generated wrapper code with the rest of your application when creating the extension module.