imageio / imageio-ffmpeg

FFMPEG wrapper for Python
BSD 2-Clause "Simplified" License
234 stars 52 forks source link

Use pkg_resources to get binary #7

Closed paulmueller closed 5 years ago

paulmueller commented 5 years ago

I would suggest to use pkg_resources to get the binary. This also enables getting the binary when the package is zipped (for some reason). I also read somewhere that this is the better approach.

import pathlib
from pkg_resources import resource_filename

binaries_dir = pathlib.Path(resource_filename("imageio", "binaries"))

I could create a PR.