| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Cropping Image
Forum: General questions
Last Post: rinaldop
Yesterday, 01:17 PM
» Replies: 4
» Views: 193
|
Too many fonts - where ar...
Forum: General questions
Last Post: rich2005
Yesterday, 09:45 AM
» Replies: 1
» Views: 140
|
Alivecolors
Forum: Other graphics software
Last Post: denzjos
Yesterday, 08:27 AM
» Replies: 0
» Views: 91
|
gimp 3 and 8bf files
Forum: Extending the GIMP
Last Post: denzjos
12-24-2025, 02:03 PM
» Replies: 0
» Views: 105
|
Preferences/Folders shows...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: programmer_ceds
12-24-2025, 10:08 AM
» Replies: 5
» Views: 3,053
|
Problems with AppImages.
Forum: Installation and usage
Last Post: teapot
12-23-2025, 07:45 PM
» Replies: 2
» Views: 358
|
Why am'I fighting with GI...
Forum: Linux and other Unixen
Last Post: NetWeeZurd
12-23-2025, 01:44 AM
» Replies: 2
» Views: 209
|
Can tooltip display time ...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: NetWeeZurd
12-23-2025, 01:40 AM
» Replies: 4
» Views: 1,333
|
Problem posting an update...
Forum: Gimp-Forum.net
Last Post: Scallact
12-21-2025, 10:19 PM
» Replies: 19
» Views: 1,045
|
Paint bucket acts "weird"
Forum: General questions
Last Post: PieterJW
12-21-2025, 06:59 PM
» Replies: 7
» Views: 503
|
|
|
| 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!
|
|
|
|