| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Where are the plugins whe...
Forum: Linux and other Unixen
Last Post: rich2005
34 minutes ago
» Replies: 1
» Views: 25
|
Colors Exchange effect is...
Forum: General questions
Last Post: ldd2
8 hours ago
» Replies: 2
» Views: 148
|
Short tutorial for create...
Forum: Tutorials and tips
Last Post: pacogarcia
Yesterday, 04:49 AM
» Replies: 0
» Views: 90
|
How to change line color ...
Forum: General questions
Last Post: rich2005
07-03-2026, 03:14 PM
» Replies: 3
» Views: 152
|
For the Khn and Klek fans...
Forum: Gallery
Last Post: Ofnuts
07-03-2026, 12:08 PM
» Replies: 0
» Views: 107
|
arakne path shapes
Forum: Extending the GIMP
Last Post: pacogarcia
07-03-2026, 04:49 AM
» Replies: 9
» Views: 2,461
|
Alternative to Drawable.g...
Forum: Scripting questions
Last Post: Scallact
07-02-2026, 01:03 PM
» Replies: 7
» Views: 6,630
|
How to iterate pixels wit...
Forum: Scripting questions
Last Post: Scallact
07-02-2026, 12:35 PM
» Replies: 1
» Views: 182
|
Problem with exporting fr...
Forum: General questions
Last Post: rich2005
07-01-2026, 07:16 AM
» Replies: 3
» Views: 285
|
Triptych - Abandoned Gate...
Forum: Gallery
Last Post: Tas_mania
07-01-2026, 06:39 AM
» Replies: 1
» Views: 198
|
|
|
| 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!
|
|
|
|