CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2015, 04:33
Post Transfer variables into python script from bash-shell
  #1
New Member
 
cfdFreshman's Avatar
 
Join Date: Nov 2015
Location: GER
Posts: 10
Rep Power: 6
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/pythonScript.py $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?

Thanx!

Regards,
cfdFreshman
cfdFreshman is offline   Reply With Quote

Reply

Tags
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
[General] Generating isosurface from vtk file with python script Leios ParaView 1 March 26, 2018 13:33
[General] Get data from Calculator filter in python script taalf ParaView 17 February 15, 2018 05:53
[OpenFOAM] Using python script for automatic post processing of openFoam vPaquet ParaView 11 June 20, 2017 08:32
problems after decomposing for running alessio.nz OpenFOAM 6 December 23, 2015 15:27
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00


All times are GMT -4. The time now is 18:01.