python-3.xblenderbpy

How to convert shared object file into python file


i have a file named bpy.so(blender python file).I need to convert it into bpy.py,so that i can import it in python.


Solution

  • You don't. file.py indicates a python script while file.so indicates a binary file. Both are python modules that can be imported using import file.

    If you have built blender as a python module and you can't import it, that means you have the module in the wrong location. It would normally be installed in the same folder as your other python modules, you can also add a path to sys.path or the environment variable PYTHONPATH to use extra folders for modules.

    Also note that blender is linked to a specific python version, check that you are using the same python version as the one blender module is built against.