Skip to content

Enable python 2/2: Python Interface

This MR builds upon async/paraview!66 and updates the Python side of things (servemanager.py mainly).

paraview.servermanager is updated based on the the new ServerManager code of parat. vtkPythonObservableWrapper is only used internally allowing code like below:

import asyncio

async def main():
  import paraview.servermanager as sm
  await sm.initialize()
  s = sm.sources.SphereSource()
  s.Radius = 10
  s.ThetaResolution = 800
  # s.UpdateInformation()
  # RuntimeError: coroutine 'Proxy.UpdateInformation' was never awaited
  await s.UpdateInformation()

  shrink = sm.filters.ShrinkFilter(Input=sm.OutputPort(s,0))
  await shrink.UpdatePipeline(0.0)

asyncio.run(main())

Note that only a limited number of the functions in servermanager.py has been updated.

Edited by Christos Tsolakis

Merge request reports