# ParaView Python Script Editor

**URL:** https://discourse.paraview.org/t/paraview-python-script-editor/8224
**Category:** Feature Requests
**Tags:** python
**Created:** [October 19, 2021, 8:20pm UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224 "2021-10-19T20:20:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![theodorebaltis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e480ec/32.png) [@theodorebaltis](https://discourse.paraview.org/u/theodorebaltis)
#### Post date: [October 19, 2021, 8:20pm UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/1 "2021-10-19T20:20:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [October 20, 2021, 7:40am UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/2 "2021-10-20T07:40:04Z")

</div>

Thanks for testing !

For reference, some information about this editor: [https://blog.kitware.com/new-paraview-python-editor-features/](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](https://gitlab.kitware.com/paraview/paraview/-/issues)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 20, 2021, 8:13am UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/3 "2021-10-20T08:13:09Z")

</div>

> 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](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](https://gitlab.kitware.com/paraview/paraview/-/issues/20624)

Very simple to implement

---

<div class="post-metadata">

### Author: ![theodorebaltis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e480ec/32.png) [@theodorebaltis](https://discourse.paraview.org/u/theodorebaltis)
#### Post date: [October 20, 2021, 3:02pm UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/4 "2021-10-20T15:02:49Z")

</div>

> [@nicolas.vuaille](#):
>
> It is useful to load a script for a `Programmable Filter / Source` (shown as `Linked` tab in the editor), without copying / pasting code.

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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 20, 2021, 3:04pm UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/5 "2021-10-20T15:04:23Z")

</div>

> [@theodorebaltis](#):
>
> 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”.

Good idea, please open an issue.

> [@](#):
>
> 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”.

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

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [October 20, 2021, 3:18pm UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/6 "2021-10-20T15:18:43Z")

</div>

> [@theodorebaltis](#):
>
> I don’t see what you mean by the `Linked` tab

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`.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 22, 2021, 8:36am UTC](https://discourse.paraview.org/t/paraview-python-script-editor/8224/7 "2021-10-22T08:36:35Z")

</div>

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