ParaView Python Script Editor

The Python Script Editor (first introduced in v5.10.0-RC1) is a welcome addition, but certainly could benefit from further development.

Creating this post in hopes of collecting feedback from other users.

My initial thoughts:

  • I’m not sure exactly what the use of “Scripts > Use as current script…” is. It just seems like an easy way to screw up my existing files.
  • Adding a toolbar section for Macros akin to Scripts seems like a natural expansion
  • Adding a “Run” button to the widget to quickly execute the currently active tab/script would add a lot of value
1 Like

Thanks for testing !

For reference, some information about this editor: https://blog.kitware.com/new-paraview-python-editor-features/

what the use of “Scripts > Use as current script…” is

This option loads a file into the current tab, replacing its content. It is useful to load a script for a Programmable Filter / Source (shown as Linked tab in the editor starting with 5.11), without copying / pasting code. If you see bugs with it, do not hesitate to report them in details, either on this forum (with a new post) or directly on our gitlab bug tracker

Adding a toolbar section for Macros akin to Scripts seems like a natural expansion

Not enterely sure about this, I envision a Tools->ManageScripts menu though.
See also: https://gitlab.kitware.com/paraview/paraview/-/issues/20606

Adding a “Run” button to the widget to quickly execute the currently active tab/script would add a lot of value

https://gitlab.kitware.com/paraview/paraview/-/issues/20624

Very simple to implement

Ah I see the benefit now.
I would suggest maybe renaming the action to something more explicit like “Load into current tab…”. Initially I thought that this option would execute the selected file because of the word “use”.

I don’t see what you mean by the Linked tab, nor I do see anything that indicates which tabs are related to my Programmable Filter. Since each Programmable Filter can potentially have up to three “scripts” it would perhaps be helpful to have something indicating which tab belongs to which “script”.

Nothing that I feel strongly about, just some suggestions.

Good idea, please open an issue.

Yes, this is the point of https://gitlab.kitware.com/paraview/paraview/-/issues/20606

Sorry, that will come in ParaView 5.11, and not 5.10. My bad. It is a tag in the tab name, as you already see Script and Macro.

It will be in 5.10, it is just not in 5.10-RC2