Running paraview python through commandline -


is there way run python script of paraview using command line. right can open file in "python shell" in paraview , results. not able figure out away run through commandline. can please tell me syntax of running it.

import os i=0 subdir = [" "]*30 # set directory want start rootdir = '/var/www/html/php/emd/job552e23fe74d102/vtk' dirname, subdirlist, filelist in os.walk(rootdir):     if dirname == rootdir + '/others':        continue     if dirname == rootdir:        continue     subdir.append(dirname)     i=i+1     print('found directory: %s' % dirname)     fname in filelist:         print('\t%s' % fname)         j=1         j= legacyvtkreader( filenames=[dirname + '/' + fname] ) 

this code

you should call script pvpython bin.

pvpython /dir/script.py 
  • make sure utilize gui trace options in paraview python shell make sure code correct before running it.