I think the most powerful use of python scripting are programmable filters, rather than python shells, since they allow to create objects in the pipeline (and your script will be processed by the server, not the client). You can find some examples in http://www.paraview.org/Wiki/ParaView/Simple_ParaView_3_Python_Filters
If you want to try those script in the python shell, you have just to modify the lines referring to "self" . For example, pdi = self.GetInput() should become something like pdi = servermanager.Fetch(FindSource("sphere1")) . I'm still not sure on the proper way to export data produced in that way (see my temptatives https://stackoverflow.com/a/24273259/1136458 )
You can also save the current state as a python file, instead of pvsm, and check what it has been done there (even if it's not 100% accurate, for example I had problems with some properties of the spreadsheet representation).
If you don't need the rendering, but just load some file, process them and save them, you can have a very quick script:
- create your pipeline in paraview GUI
- export state as py
- open the python file and delete all the representation and data
visualization code (only if you are not interested in those, of course)
- for exporting a polydata, set it as ActiveSource, then use something like
vtkWriter = DataSetWriter(FileName = 'Surface.vtk' , Input = GetActiveSource(), FileType = 1)
vtkWriter.UpdatePipeline()
- run it multiple times just changing some parameters!
As already mentioned by andybauer, you can find the documentation here http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/