Re: [Paraview] Script driven paraview

2013-05-09 Thread Timothy Cale
Utkarsh:

Thanks! Works!

I had tried that: I thought it had not worked, because it (python?,
pvpython?) did not print to the screen from a test script.

Is there a way to print info to the screen (or to a specified file)? When I
use Run Script (to run show_vtu.py) from the python shell that is started
when Tools - Python Shell is manually selected, prints to the screen work.

Thanks,
Tim


On Wed, May 8, 2013 at 8:09 AM, Utkarsh Ayachit utkarsh.ayac...@kitware.com
 wrote:

 You can use the --script command line argument to paraview
 executable to run a Python script after startup e,g,
  paraview --script=show_vtu.py

 Utkarsh

 On Sat, May 4, 2013 at 12:45 PM, Timothy Cale drtsc.p...@gmail.com
 wrote:
  I would like to display a set of meshes that result from a (bash) script
  driven set of simulations
  and meshing steps.
 
  I have written a script that does what I want (at least basically), if I
  manually go into the paraview
  gui and start the (Tools --) Python Shell, then hit run script and
 select
  the desired script.
 
  In an attempt to automate the visialization, I wrote a bash script with
 the
  two relevant lines being:
 
  paraview /dev/null 
  pvpython show_vtu.py
 
  This generates non-persistent, non-interactive images that I expect -
 though
  it would be good
  to know if there is a way to make such images persistent and interactive.
  (in addition to
  starting paraview)
 
  Question:  Is there a way to use such a script (bash, python called from
  bash . . . ) to
  start paraview, and use a script to visualize data in the gui?
 
  Thanks,
  Tim
 
  ___
  Powered by www.kitware.com
 
  Visit other Kitware open-source projects at
  http://www.kitware.com/opensource/opensource.html
 
  Please keep messages on-topic and check the ParaView Wiki at:
  http://paraview.org/Wiki/ParaView
 
  Follow this link to subscribe/unsubscribe:
  http://www.paraview.org/mailman/listinfo/paraview
 

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Script driven paraview

2013-05-09 Thread Pat Marion
Hi Tim,

ParaView reassigns sys.stdout so that output can be routed to the ParaView
python console window.  Your script could set stdout back to the original
value:

import sys
sys.stdout = sys.__stdout__
sys.stderr = sys.__stderr__

For documentation, see:

http://docs.python.org/2/library/sys.html#sys.stdout


Pat


On Fri, May 10, 2013 at 1:40 AM, Timothy Cale drtsc.p...@gmail.com wrote:

 Utkarsh:

 Thanks! Works!

 I had tried that: I thought it had not worked, because it (python?,
 pvpython?) did not print to the screen from a test script.

 Is there a way to print info to the screen (or to a specified file)? When
 I use Run Script (to run show_vtu.py) from the python shell that is
 started when Tools - Python Shell is manually selected, prints to the
 screen work.

 Thanks,
 Tim


 On Wed, May 8, 2013 at 8:09 AM, Utkarsh Ayachit 
 utkarsh.ayac...@kitware.com wrote:

 You can use the --script command line argument to paraview
 executable to run a Python script after startup e,g,
  paraview --script=show_vtu.py

 Utkarsh

 On Sat, May 4, 2013 at 12:45 PM, Timothy Cale drtsc.p...@gmail.com
 wrote:
  I would like to display a set of meshes that result from a (bash) script
  driven set of simulations
  and meshing steps.
 
  I have written a script that does what I want (at least basically), if I
  manually go into the paraview
  gui and start the (Tools --) Python Shell, then hit run script and
 select
  the desired script.
 
  In an attempt to automate the visialization, I wrote a bash script with
 the
  two relevant lines being:
 
  paraview /dev/null 
  pvpython show_vtu.py
 
  This generates non-persistent, non-interactive images that I expect -
 though
  it would be good
  to know if there is a way to make such images persistent and
 interactive.
  (in addition to
  starting paraview)
 
  Question:  Is there a way to use such a script (bash, python called from
  bash . . . ) to
  start paraview, and use a script to visualize data in the gui?
 
  Thanks,
  Tim
 
  ___
  Powered by www.kitware.com
 
  Visit other Kitware open-source projects at
  http://www.kitware.com/opensource/opensource.html
 
  Please keep messages on-topic and check the ParaView Wiki at:
  http://paraview.org/Wiki/ParaView
 
  Follow this link to subscribe/unsubscribe:
  http://www.paraview.org/mailman/listinfo/paraview
 



 ___
 Powered by www.kitware.com

 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the ParaView Wiki at:
 http://paraview.org/Wiki/ParaView

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Script driven paraview

2013-05-08 Thread Utkarsh Ayachit
You can use the --script command line argument to paraview
executable to run a Python script after startup e,g,
 paraview --script=show_vtu.py

Utkarsh

On Sat, May 4, 2013 at 12:45 PM, Timothy Cale drtsc.p...@gmail.com wrote:
 I would like to display a set of meshes that result from a (bash) script
 driven set of simulations
 and meshing steps.

 I have written a script that does what I want (at least basically), if I
 manually go into the paraview
 gui and start the (Tools --) Python Shell, then hit run script and select
 the desired script.

 In an attempt to automate the visialization, I wrote a bash script with the
 two relevant lines being:

 paraview /dev/null 
 pvpython show_vtu.py

 This generates non-persistent, non-interactive images that I expect - though
 it would be good
 to know if there is a way to make such images persistent and interactive.
 (in addition to
 starting paraview)

 Question:  Is there a way to use such a script (bash, python called from
 bash . . . ) to
 start paraview, and use a script to visualize data in the gui?

 Thanks,
 Tim

 ___
 Powered by www.kitware.com

 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the ParaView Wiki at:
 http://paraview.org/Wiki/ParaView

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Script driven paraview

2013-05-04 Thread Timothy Cale
I would like to display a set of meshes that result from a (bash) script
driven set of simulations
and meshing steps.

I have written a script that does what I want (at least basically), if I
manually go into the paraview
gui and start the (Tools --) Python Shell, then hit run script and select
the desired script.

In an attempt to automate the visialization, I wrote a bash script with the
two relevant lines being:

paraview /dev/null 
pvpython show_vtu.py

This generates non-persistent, non-interactive images that I expect -
though it would be good
to know if there is a way to make such images persistent and interactive.
(in addition to
starting paraview)

Question:  Is there a way to use such a script (bash, python called from
bash . . . ) to
start paraview, and use a script to visualize data in the gui?

Thanks,
Tim
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview