CFD Online Logo CFD Online URL
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Transfer variables into python script from bash-shell

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

LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2015, 03:33
Post Transfer variables into python script from bash-shell
New Member
cfdFreshman's Avatar
Join Date: Nov 2015
Location: GER
Posts: 10
Rep Power: 10
cfdFreshman is on a distinguished road
Hello to all,

today my issue is the integration of variables in python script.
I would like to transfer a few variables from bash to a python script witch is traced with ParaView 4.4.0. In a former version of ParaView (3.89) I've had the following commands:

in bash (.sh):
pathTo/pvbatch --use-offscreen-rendering pathTo/ $variable1 constant $variable2 ...

in python script (.py):
import sys
try: paraview.simple
except: from paraview.simple import *

nameVariable1 = sys.argv [1]
nameConstant = sys.argv [2]
nameVariable2 = sys.argv [3]

But if I use these in .py version 4.4.0 it shows an error concerning "argv".
Do you know what I have missed or how I can do it in a different way?


cfdFreshman is offline   Reply With Quote


bash, constant, python, variable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Using python script for automatic post processing of openFoam vPaquet ParaView 12 December 16, 2021 03:30
problems after decomposing for running OpenFOAM 7 March 5, 2021 04:49
[General] Generating isosurface from vtk file with python script Leios ParaView 1 March 26, 2018 12:33
[General] Get data from Calculator filter in python script taalf ParaView 17 February 15, 2018 04:53
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00

All times are GMT -4. The time now is 16:50.