| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,254
» Latest member: MurilloR
» Forum threads: 7,877
» Forum posts: 42,768
Full Statistics
|
| Latest Threads |
Gimp-Forum.net has not be...
Forum: Gimp-Forum.net
Last Post: Tas_mania
9 hours ago
» Replies: 12
» Views: 1,102
|
key-mon don't want to ins...
Forum: Watercooler
Last Post: MrsP-from-C
11 hours ago
» Replies: 3
» Views: 153
|
Transform Handles hard to...
Forum: General questions
Last Post: rich2005
11 hours ago
» Replies: 3
» Views: 182
|
Gimp V.3.2.x No Batch Edi...
Forum: General questions
Last Post: Taggs
Yesterday, 01:42 PM
» Replies: 3
» Views: 210
|
Gradient issue on large i...
Forum: General questions
Last Post: rich2005
Yesterday, 08:32 AM
» Replies: 7
» Views: 437
|
Scanner menu missing
Forum: General questions
Last Post: rich2005
04-27-2026, 08:13 AM
» Replies: 11
» Views: 1,587
|
How to create custom comp...
Forum: General questions
Last Post: denzjos
04-26-2026, 05:23 PM
» Replies: 3
» Views: 275
|
Rotating a layer against ...
Forum: General questions
Last Post: sallyanne
04-26-2026, 07:19 AM
» Replies: 11
» Views: 1,289
|
Beginner question - setti...
Forum: General questions
Last Post: nmw01223
04-25-2026, 08:31 AM
» Replies: 8
» Views: 1,001
|
Thank you for Gimp
Forum: Watercooler
Last Post: denzjos
04-23-2026, 06:53 AM
» Replies: 1
» Views: 1,434
|
|
|
| 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!
|
|
|
|