
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
This package is a simple tool intended to easily, given the path for some executable in any of the "Big Three" most used OSes, provide the path to the icon for that executable.
For example, you can use it to fill a list view for a launcher with the icons from the applications you wish to execute.
There are two modules in this package. One is 'finder' with Finder class, which, through the constructor iconfinder.Finder('path/to/some/executable')
will return the path to the executable icon_filepath
. The other is 'extractor' which has the Extractor class, which, through the constructor iconfinder.Extractor('path/to/an/icon')
will return the icon as a PIL Image object icon_image
.
If you use Finder to get the icon path, you can simply use the method grab
from the finder instance.
For example, under Windows:
>>> from iconfinder import finder
>>> finder_instance = finder.Finder('C:\\Windows\\System32\\notepad.exe')
>>> finder_instance.icon_filepath # this is the path to the icon
>>> finder_instance.grab() # this is the icon as a PIL Image object
Note: on Windows is not necessary to use first class Finder since the icon comes inside the binary.
This library is dependent, under Windows, of the pywin32 package. Under Linux, uses pyxdg, and under the mac, the plistlib, which cames pre-packaged with the Python Standard Library. Of course, Pillow is also a dependency.
To run the unit tests, clone the repo and execute pytest
from the main directory.
To get a taste of the library, you can run python -m iconfinder.finder
or just iconfinder
with the executable path from the main directory. Specifying test
as the argument will perform a test with a default executable and quit.
FAQs
Easily get the icon associated with an executable in every OS
We found that iconfinder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.