| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
GIMP v3.2.4 failed to lau...
Forum: General questions
Last Post: denzjos
10 hours ago
» Replies: 2
» Views: 154
|
logo for website profile ...
Forum: General questions
Last Post: BezierCurve
Today, 03:52 AM
» Replies: 7
» Views: 992
|
.tif Unknown Filetype to ...
Forum: General questions
Last Post: ajax
05-11-2026, 02:12 AM
» Replies: 3
» Views: 268
|
Linear color profile not ...
Forum: General questions
Last Post: rich2005
05-10-2026, 08:09 AM
» Replies: 1
» Views: 187
|
Plugins & Scripts not fou...
Forum: General questions
Last Post: rich2005
05-10-2026, 07:45 AM
» Replies: 4
» Views: 394
|
new plugin colour grading...
Forum: Extending the GIMP
Last Post: rich2005
05-08-2026, 08:29 AM
» Replies: 5
» Views: 904
|
ExifToolGUI and ExifTool ...
Forum: Other graphics software
Last Post: denzjos
05-07-2026, 09:07 AM
» Replies: 14
» Views: 17,309
|
Langage français de l'int...
Forum: OSX
Last Post: rich2005
05-06-2026, 07:28 PM
» Replies: 1
» Views: 640
|
Locally Installed Help is...
Forum: General questions
Last Post: rich2005
05-06-2026, 10:10 AM
» Replies: 3
» Views: 843
|
scheme : error in vector
Forum: Extending the GIMP
Last Post: geka
05-06-2026, 05:40 AM
» Replies: 2
» Views: 399
|
|
|
| How can I use file-glob to only return files with certain extensions? |
|
Posted by: charlweed - 05-10-2021, 09:38 PM - Forum: Extending the GIMP
- Replies (1)
|
 |
I'm trying to use python-fu in GIMP. I would like pdb.file_glob to return an array of image files in the format I specify. I tried:
Code:
myGlob = "*.png|*.PNG|*.jpg|*.JPG|*.gif|*.GIF|*.xcf|*.XCF"
globpath = os.path.join(patternDir, myGlob)
num_files, files = pdb.file_glob(globpath, 0)
But the files array is always empty, I assume because the glob syntax is invalid.
Note that if I use
I get the graphics files I want, but I also get files such as "fake.txt" and sub-directories, both I want to exclude.
I would also like the documentation for file-glob, I don't want to clone the repo and try and read the c++ source.
Thanks!
|
|
|
|