| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Background - Foreground -...
Forum: General questions
Last Post: saint_m
Yesterday, 04:28 PM
» Replies: 12
» Views: 1,243
|
2.10.38---Dock sizes and ...
Forum: Windows
Last Post: IndiePubber
04-15-2026, 06:21 PM
» Replies: 2
» Views: 316
|
Scanner menu missing
Forum: General questions
Last Post: CmykStudent_
04-15-2026, 11:26 AM
» Replies: 9
» Views: 570
|
Smaller font size main me...
Forum: General questions
Last Post: mmhmjanssen
04-13-2026, 09:51 AM
» Replies: 0
» Views: 191
|
GIMP 3.0 RC: Text Tool fo...
Forum: General questions
Last Post: sallyanne
04-12-2026, 07:16 AM
» Replies: 11
» Views: 1,127
|
Working with layers - a h...
Forum: General questions
Last Post: sallyanne
04-11-2026, 01:26 PM
» Replies: 3
» Views: 373
|
apply a certain gradient ...
Forum: General questions
Last Post: saint_m
04-11-2026, 01:14 PM
» Replies: 4
» Views: 415
|
How do I hide/unhide a *g...
Forum: General questions
Last Post: rich2005
04-11-2026, 12:59 PM
» Replies: 1
» Views: 252
|
Gimp 3.2.2 (and 3.0) text...
Forum: General questions
Last Post: rich2005
04-11-2026, 09:52 AM
» Replies: 1
» Views: 261
|
color scala - how to defi...
Forum: General questions
Last Post: saint_m
04-10-2026, 12:28 PM
» Replies: 5
» Views: 533
|
|
|
| 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!
|
|
|
|