New globbing behavior on the server side when using python
One can now glob files using paraview.util package in python.
The function is called paraview.util.Glob(path, rootDir = None)
This can be especially useful in a client server environment to fetch a list of file sequences
avaiable in the server.
Let us illustrate its usage and assume that one holds a the list of files
file0.png
, file1.png
in a directory dirPath
.
import paraview.util
glob = paraview.util.Glob(dirPath + "file*.png")
groundTruth = [dirPath + "file0.png", dirPath + "file1.png"]
if groundTruth == glob:
print("Success")
else:
print("Failure")
This script will print Success
.
Pythin Package fnmatch
is used on the backend in the server side to process the input expression.
Fixes #19454 (closed)
Fixes #19454 (closed)
Edited by Yohann Bearzi (Kitware)