CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Image Paraview with Python

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   Today, 06:23
Arrow Image Paraview with Python
  #1
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 121
Rep Power: 3
FlyBob91 is on a distinguished road
Hello to all,
my teacher asked me to find a manner to produce a series of images and to automate this procedure because we have to make different test for the colour etc. After a rapid search i (maybe) understand that this could be made by the use of a python script.
I initially built Paraview with OpenFOAM but then i noticed this is an incomplete version because it hadn't let to save .pdf image. So i installed a "stand alone" version and now i wan to to produce an image through a python script.

I test this one find in the web

Code:
from paraview.simple import *
simple.Sphere()
simple.Show()
simple.Render()
simple.WriteImage("foo.png")
but, unfortunatley, when i run this script an errorr occurs and it does not load the module.

Code:
Traceback (most recent call last):
  File "ciao.py", line 2, in <module>
    from paraview.simple import *
ImportError: No module named 'paraview'

i use python3
What's i'm doing wrong?

Thanks for help
FlyBob91 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Paraview with Python FlyBob91 ParaView 1 Today 06:03
Determining number of cores and/or paraview executable via python aerogt3 ParaView 0 December 9, 2014 06:54
paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 aylalisa OpenFOAM Paraview & paraFoam 4 June 13, 2014 08:52
How to get Python Shell into ParaView 3.8.1? blaise OpenFOAM Installation 3 July 24, 2012 04:58
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41


All times are GMT -4. The time now is 07:39.