Skip to content
Snippets Groups Projects
Commit 26f49238 authored by Christoph Grüninger's avatar Christoph Grüninger Committed by Thomas Fetzer
Browse files

Merge branch 'feature/postprocessing-documentation' into 'master'

[postprocessing] Add colored help message indicating use of pvpython

See merge request !443
parent 56e81315
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!446Merge branch 'feature/postprocessing-documentation' into 'master'
...@@ -5,10 +5,9 @@ import os ...@@ -5,10 +5,9 @@ import os
# parse arguments # parse arguments
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog='pvpython ' + sys.argv[0], prog='\033[1m\033[94m' + 'pvpython' + '\033[0m' + ' ' + sys.argv[0],
description='Extract data from the paraview plotOverLine filter.' description='Extract data from the paraview plotOverLine filter.'
) )
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--files', nargs='+', required=True, help="vtu files to be processed") parser.add_argument('-f', '--files', nargs='+', required=True, help="vtu files to be processed")
parser.add_argument('-o', '--outputDirectory', default='', help="Directory to which the data files are written") parser.add_argument('-o', '--outputDirectory', default='', help="Directory to which the data files are written")
parser.add_argument('-of', '--outFile', default='', help="Basename of the written csv file") parser.add_argument('-of', '--outFile', default='', help="Basename of the written csv file")
...@@ -18,7 +17,10 @@ parser.add_argument('-r', '--resolution', type=int, default=1000, help='Resoluti ...@@ -18,7 +17,10 @@ parser.add_argument('-r', '--resolution', type=int, default=1000, help='Resoluti
parser.add_argument('-v', '--verbosity', type=int, default=2, help='Verbosity of the output. 1 = print progress. 2 = print data columns') parser.add_argument('-v', '--verbosity', type=int, default=2, help='Verbosity of the output. 1 = print progress. 2 = print data columns')
args = vars(parser.parse_args()) args = vars(parser.parse_args())
from paraview.simple import * try:
from paraview.simple import *
except ImportError:
print("`paraview.simple` not found. Make sure using pvpython instead of python.")
# import locations # import locations
commonOutDirectory = False commonOutDirectory = False
......
...@@ -6,7 +6,7 @@ import sys ...@@ -6,7 +6,7 @@ import sys
# parse arguments # parse arguments
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog='pvpython ' + sys.argv[0], prog='\033[1m\033[94m' + 'pvpython' + '\033[0m' + ' ' + sys.argv[0],
description='Extract data from the paraview probeLocation and plotOverTime filters.' description='Extract data from the paraview probeLocation and plotOverTime filters.'
) )
parser.add_argument('-f', '--files', nargs='+', required=True, help="pvd files to be processed") parser.add_argument('-f', '--files', nargs='+', required=True, help="pvd files to be processed")
...@@ -16,7 +16,10 @@ parser.add_argument('-p', '--point', type=float, nargs=3, required=True, help='C ...@@ -16,7 +16,10 @@ parser.add_argument('-p', '--point', type=float, nargs=3, required=True, help='C
parser.add_argument('-v', '--verbosity', type=int, default=2, help='Verbosity of the output. 1 = print progress. 2 = print data columns') parser.add_argument('-v', '--verbosity', type=int, default=2, help='Verbosity of the output. 1 = print progress. 2 = print data columns')
args = vars(parser.parse_args()) args = vars(parser.parse_args())
from paraview.simple import * try:
from paraview.simple import *
except ImportError:
print("`paraview.simple` not found. Make sure using pvpython instead of python.")
# import locations # import locations
commonOutDirectory = False commonOutDirectory = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment