| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 4,874
» Latest member: Racine75
» Forum threads: 7,936
» Forum posts: 43,193
Full Statistics
|
| Latest Threads |
Impression au format impo...
Forum: General questions
Last Post: rich2005
Yesterday, 12:38 PM
» Replies: 3
» Views: 128
|
Open-source GIMP 3 plugin...
Forum: Extending the GIMP
Last Post: kocabiyik
Yesterday, 11:49 AM
» Replies: 2
» Views: 136
|
Disproportionate torso to...
Forum: General questions
Last Post: denzjos
Yesterday, 06:36 AM
» Replies: 4
» Views: 198
|
Picture Repair
Forum: General questions
Last Post: denzjos
07-28-2026, 04:33 PM
» Replies: 11
» Views: 617
|
image - on a website - an...
Forum: General questions
Last Post: MrsP-from-C
07-28-2026, 06:46 AM
» Replies: 5
» Views: 316
|
Where are the plugins whe...
Forum: Linux and other Unixen
Last Post: phobby
07-26-2026, 06:13 AM
» Replies: 12
» Views: 1,365
|
Hi, I'm new here, and I'd...
Forum: Extending the GIMP
Last Post: el1an
07-25-2026, 11:39 PM
» Replies: 2
» Views: 281
|
some legacy gimp smc scri...
Forum: Extending the GIMP
Last Post: jkbzh
07-25-2026, 01:03 PM
» Replies: 0
» Views: 204
|
want to combine some of t...
Forum: General questions
Last Post: sallyanne
07-25-2026, 08:59 AM
» Replies: 3
» Views: 294
|
Python-Fu Gimp 3.2.4. Get...
Forum: Extending the GIMP
Last Post: Scallact
07-23-2026, 04:32 PM
» Replies: 10
» Views: 729
|
|
|
| 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!
|
|
|
|