| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,305
» Latest member: RicoZoy
» Forum threads: 7,907
» Forum posts: 42,907
Full Statistics
|
| Latest Threads |
Welcome Screen Colour The...
Forum: Windows
Last Post: rich2005
1 hour ago
» Replies: 8
» Views: 242
|
Switch tools from Text to...
Forum: General questions
Last Post: rich2005
3 hours ago
» Replies: 4
» Views: 513
|
Lumi-o
Forum: Alternate Gimp packagings
Last Post: pixelmixer
Yesterday, 05:17 PM
» Replies: 0
» Views: 88
|
Artbox Autosave
Forum: Alternate Gimp packagings
Last Post: pixelmixer
Yesterday, 04:49 PM
» Replies: 1
» Views: 1,810
|
Why is the Move tool movi...
Forum: Tutorials and tips
Last Post: rich2005
05-25-2026, 01:23 PM
» Replies: 3
» Views: 5,862
|
Batcher - Batch Image Pro...
Forum: Extending the GIMP
Last Post: rich2005
05-24-2026, 04:24 PM
» Replies: 11
» Views: 17,641
|
arakne path shapes
Forum: Extending the GIMP
Last Post: rich2005
05-24-2026, 08:13 AM
» Replies: 8
» Views: 1,917
|
GIMP 3.2.x
Forum: General questions
Last Post: rich2005
05-24-2026, 07:43 AM
» Replies: 5
» Views: 564
|
question about "Batch Ima...
Forum: General questions
Last Post: vebe67
05-23-2026, 06:32 AM
» Replies: 2
» Views: 289
|
chemin - path
Forum: General questions
Last Post: ApacheBlue
05-22-2026, 02:13 PM
» Replies: 7
» Views: 658
|
|
|
| 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!
|
|
|
|