| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Photobooth "look" - pytho...
Forum: Extending the GIMP
Last Post: gasMask
Yesterday, 02:45 PM
» Replies: 2
» Views: 554
|
Help with making this eff...
Forum: General questions
Last Post: Tygra
Yesterday, 01:37 PM
» Replies: 4
» Views: 560
|
Gimp 3.x scanner xsane pl...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: jsamb
Yesterday, 10:05 AM
» Replies: 15
» Views: 14,949
|
Installing in a secure en...
Forum: Windows
Last Post: ThecknoDecker
01-09-2026, 06:18 PM
» Replies: 0
» Views: 76
|
GIMP 3.04: Image gets ran...
Forum: General questions
Last Post: sallyanne
01-09-2026, 11:57 AM
» Replies: 3
» Views: 569
|
Need help with Plug-Ins
Forum: General questions
Last Post: fritscho
01-08-2026, 12:31 PM
» Replies: 6
» Views: 834
|
erasing paintbrush stroke...
Forum: General questions
Last Post: sallyanne
01-07-2026, 10:54 PM
» Replies: 3
» Views: 675
|
Single single-window mode...
Forum: General questions
Last Post: teapot
01-07-2026, 07:55 PM
» Replies: 5
» Views: 768
|
Help and advice with this...
Forum: General questions
Last Post: Tygra
01-07-2026, 04:36 PM
» Replies: 12
» Views: 1,084
|
Layer Problems in 3.0.6
Forum: General questions
Last Post: NuV01aR!
01-05-2026, 06:00 PM
» Replies: 2
» Views: 617
|
|
|
| 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!
|
|
|
|