Controlling Paraview GUI from Python IDLE

前端 未结 2 1796
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 16:36

I am trying to control Paraview interactively using IDLE. This would involve sending commands from IDLE and seeing the changes occur in Paraview. I would rather not use the

2条回答
  •  死守一世寂寞
    2021-01-14 17:14

    You need to run paraview in multiclient/server mode. In a terminal run pvserver.

    ./bin/pvserver --multi-clients
    

    In another terminal, run paraview and connect to your server

    ./bin/paraview
    File->Connect
    AddServer -> Choose a name -> Configure -> Save
    Connect
    

    In a third terminal, run pvpython (or your own configured python)

    ./bin/pvpython
    >> from paraview.simple import *
    >> Connect("localhost")
    >> Cone()
    >> Show()
    

提交回复
热议问题