| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Need help installing Resy...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: Dave Rove
Yesterday, 08:44 AM
» Replies: 8
» Views: 7,311
|
Color management and soft...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: Malsasa
06-17-2026, 03:14 PM
» Replies: 5
» Views: 9,775
|
How to restore tool docks...
Forum: General questions
Last Post: rich2005
06-16-2026, 06:40 PM
» Replies: 3
» Views: 594
|
How to change mouse wheel...
Forum: General questions
Last Post: rich2005
06-16-2026, 07:27 AM
» Replies: 9
» Views: 19,059
|
Software-update: Affinity...
Forum: Other graphics software
Last Post: denzjos
06-16-2026, 06:50 AM
» Replies: 0
» Views: 633
|
Converting python plugin-...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: migf1
06-15-2026, 01:01 PM
» Replies: 66
» Views: 57,809
|
A way to disable gimps ov...
Forum: General questions
Last Post: rich2005
06-15-2026, 08:17 AM
» Replies: 6
» Views: 954
|
Installing LayerFX for Gi...
Forum: General questions
Last Post: rich2005
06-14-2026, 01:51 PM
» Replies: 1
» Views: 200
|
Help with coloring comic ...
Forum: General questions
Last Post: denzjos
06-14-2026, 08:41 AM
» Replies: 2
» Views: 618
|
Is it possible to save TI...
Forum: Windows
Last Post: ScanEditor
06-13-2026, 07:48 PM
» Replies: 2
» Views: 676
|
|
|
| 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!
|
|
|
|