Cannot get the script path in python shell
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I tried to write a script for paraview - tools - python shell - run script, in which I needed the script directory path to load a vtk file in the same dir.
In standard python, sys.path[0] is set to the script path, but in paraview shell it is set to paraview site-packages. os.getcwd() does not work either. There seems no way to get the script path.
This is really inconvenient since you need to give the full path of vtk; you can't move 'em to another folder!