Hi!

I often write simple scripts for pvpython which take one or more arguments (usually filenames) and run them so:
$ pvpython myscript.py filename

Till version 5rc1 I parse arguments using simple analysis of sys.argv, like this:
{{{
...
import os, sys
from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

if len(sys.argv) < 1:
    sys.exit('One parameter, name of an input file, is mandatory.')
if not os.path.exists(sys.argv[1]):
    sys.exit('Specified file "' + sys.argv[1] + '" does not exists!')

data = OpenDataFile(sys.argv[1])
...
}}}

And this works fine untill I tried new version. In 5rc1 I always get Segmentation Fault: Error running "~/ParaView-5.0.0-RC1-Qt4-OpenGL2-Linux-64bit/lib/paraview-5.0/pvpython" "myscript.py" "filename"Segmentation fault

Seems, sys module couldn't be imported... Is it problem with rc-version? How can I correctly pass arguments to a script?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to