Modify a blend file via console outside of GUI I have built a little 'smart' robot using a Raspberry Pi and Arduino. Currently it can move around, sense obstacles, determine if it can pass, etc. My biggest problem so far is that it is completely "in the moment" and doesn't remember that there was a wall on its left once it's not sensing it. I'd like it to remember there was a wall on its left and so on so I thought, maybe I could use Blender for its visual memory! 

Is it possible to add/manipulate meshes in a blend file outside of Blender via Python? My robot's code is in Python but I suppose if I have to use C for it, I can just write a Python wrapper. I don't expect to generate high detail meshes or anything like that, just cubes so I can inspect what obstacles it's remembering.
You can also build bpy as a standalone module using cmake, and use it in a python script with import bpy
This is pretty similar to doing blender -b -P customscript.py