gpy allows open an pNbody object and enter the python interpreter, where you can interact with the object using the variable nb.