| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Pixels after exporting to...
Forum: General questions
Last Post: Scallact
6 hours ago
» Replies: 3
» Views: 224
|
can I do these Photoshop ...
Forum: General questions
Last Post: rich2005
9 hours ago
» Replies: 1
» Views: 88
|
Selecting more than one l...
Forum: General questions
Last Post: teapot
Today, 01:40 AM
» Replies: 4
» Views: 337
|
affinity now free
Forum: Other graphics software
Last Post: connag
Today, 12:30 AM
» Replies: 1
» Views: 566
|
GIMP: The Movie | Officia...
Forum: Gallery
Last Post: connag
Today, 12:21 AM
» Replies: 1
» Views: 94
|
migrating 2.8 bash script...
Forum: Scripting questions
Last Post: vince
Yesterday, 08:07 AM
» Replies: 10
» Views: 412
|
script-fu help
Forum: Extending the GIMP
Last Post: teapot
Yesterday, 04:57 AM
» Replies: 5
» Views: 325
|
Digikam: photo management...
Forum: Other graphics software
Last Post: denzjos
03-08-2026, 05:50 PM
» Replies: 8
» Views: 10,541
|
Horizons
Forum: General questions
Last Post: denzjos
03-08-2026, 10:33 AM
» Replies: 8
» Views: 647
|
RapidRAW
Forum: Other graphics software
Last Post: denzjos
03-08-2026, 08:17 AM
» Replies: 4
» Views: 1,270
|
|
|
| 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!
|
|
|
|