PyCharm IDE and Paraview

Hello everyone!

I am using Paraview to automate the post-processing of my model. I am currently writing a script in PyCharm and through Paraview in “Run script”, I can make it run, everything works fine.

But I would like to make an interactive and executable program that the user could choose what kind of filters he would like to analyse, making PyCharm to open Paraview and run the script automatically. I managed to open Paraview by a code, but I don’t know what to do when talking about Paraview running a script without clicking in “Run script”.

Another issue that I am struggling with, I am creating different .py files (around five), and I would like to only one of them (the main one) would run the rest, but Paraview seems to not recognize opening other .py files from the main one.

Anyone could help? Thank you!
Thiago.

Hi @Thipessoa ,

You are either looking for

pvpython /path/to/script

or

paraview --script /path/to/script

Best,

Hello @mwestphal, thanks for the reply.

This should be added into the .py file script, right?

I will be testing here and giving a reply later. Thanks!!

Hey @mwestphal, correct me if I am wrong, but both “pvpython /path/to/script” and “paraview --script /path/to/script” are shell commands, right? I should find a way to read these lines in the .py file then.

I already managed to make the .py file open Paraview through os library “os.system(path/paraview.exe)”.

Now just need to make the same .py file insert everything that comes out from the trace tool into the Python shell or make it read another .py file for example.

Hi @Thipessoa ,

Yes

I should find a way to read these lines in the .py file then.

Not at all, you can just use pvpython directly. Why do you want to run paraview ?

@mwestphal I see what you mean, I don’t have to open Paraview to make it run then…

Thank you for all the help, I will try make these work!