| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 4,990
» Latest member: gitano
» Forum threads: 7,730
» Forum posts: 42,023
Full Statistics
|
| Latest Threads |
Resynthesizer for Windows...
Forum: Extending the GIMP
Last Post: rich2005
10 hours ago
» Replies: 4
» Views: 10,757
|
Gimp exports TIFFs with s...
Forum: General questions
Last Post: rich2005
Yesterday, 12:41 PM
» Replies: 3
» Views: 163
|
Problems with AppImages.
Forum: Installation and usage
Last Post: rich2005
Yesterday, 09:25 AM
» Replies: 1
» Views: 126
|
an iOS app that assists p...
Forum: Other graphics software
Last Post: zzh
12-08-2025, 12:59 PM
» Replies: 3
» Views: 232
|
Path autocurves plugin (G...
Forum: Extending the GIMP
Last Post: denzjos
12-08-2025, 11:45 AM
» Replies: 2
» Views: 228
|
Gimp 3.0 get Metadata wit...
Forum: Scripting questions
Last Post: Volker
12-08-2025, 11:12 AM
» Replies: 4
» Views: 592
|
Problem posting an update...
Forum: Gimp-Forum.net
Last Post: Scallact
12-08-2025, 10:13 AM
» Replies: 2
» Views: 193
|
Average colour in GIMP - ...
Forum: Extending the GIMP
Last Post: chuckhenrich
12-08-2025, 07:29 AM
» Replies: 8
» Views: 599
|
Setting a default directo...
Forum: Tutorials and tips
Last Post: Ofnuts
12-07-2025, 05:30 PM
» Replies: 0
» Views: 111
|
Fix low resolution images
Forum: General questions
Last Post: rich2005
12-07-2025, 10:48 AM
» Replies: 5
» Views: 366
|
|
|
| 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!
|
|
|
|