import sys, pkg_resources, imp
__file__ = pkg_resources.resource_filename(__name__, 'hello_world.so')
__loader__ = None
del __bootstrap__, __loader__
imp.load_dynamic(__name__, __file__)
__bootstrap__()
How to import python module from .so file?