| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,190
» Latest member: ers
» Forum threads: 7,843
» Forum posts: 42,592
Full Statistics
|
| Latest Threads |
Rich, a question about th...
Forum: Alternate Gimp packagings
Last Post: CtrlAltDel
16 minutes ago
» Replies: 4
» Views: 49
|
ExifToolGUI and ExifTool ...
Forum: Other graphics software
Last Post: denzjos
3 hours ago
» Replies: 13
» Views: 15,130
|
No Longer
Forum: General questions
Last Post: sallyanne
Today, 06:50 AM
» Replies: 0
» Views: 99
|
Severe Security Flaws in ...
Forum: Linux and other Unixen
Last Post: rich2005
Yesterday, 04:59 PM
» Replies: 6
» Views: 221
|
Parametric Mask plug-in f...
Forum: Extending the GIMP
Last Post: denzjos
03-19-2026, 05:32 PM
» Replies: 1
» Views: 140
|
How do I uninstall GIMP 3...
Forum: Linux and other Unixen
Last Post: rich2005
03-19-2026, 04:29 PM
» Replies: 3
» Views: 2,122
|
How do I color Bevel Text...
Forum: General questions
Last Post: rich2005
03-18-2026, 12:36 PM
» Replies: 8
» Views: 650
|
Gimp 3.x scanner xsane pl...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
03-18-2026, 09:52 AM
» Replies: 22
» Views: 19,144
|
Directory & file structur...
Forum: General questions
Last Post: rich2005
03-18-2026, 09:23 AM
» Replies: 1
» Views: 296
|
Batcher - Batch Image Pro...
Forum: Extending the GIMP
Last Post: iborg
03-17-2026, 09:01 PM
» Replies: 8
» Views: 13,574
|
|
|
| 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!
|
|
|
|