diff options
author | jaseg <code@jaseg.net> | 2016-07-01 13:12:02 +0200 |
---|---|---|
committer | jaseg <code@jaseg.net> | 2016-07-01 13:12:02 +0200 |
commit | 8d8b061fcc2b606c893c4fd460318a118b00ddbc (patch) | |
tree | 23e4305b5294d2cc58cce158284b365377d93b50 | |
parent | f3cab6cdf1298e78133ce157835e14f44da7047a (diff) | |
download | python-mpv-8d8b061fcc2b606c893c4fd460318a118b00ddbc.tar.gz python-mpv-8d8b061fcc2b606c893c4fd460318a118b00ddbc.tar.bz2 python-mpv-8d8b061fcc2b606c893c4fd460318a118b00ddbc.zip |
Use ctypes.util.find_library to find libmpv. Thanks to @mozbugbox
-rw-r--r-- | mpv.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ from ctypes import * +import ctypes.util import threading import os import asyncio @@ -10,9 +11,9 @@ from functools import partial if os.name == 'nt': - backend = CDLL('mpv-1.dll') + backend = CDLL(ctypes.util.find_library('mpv-1.dll')) else: - backend = CDLL('libmpv.so') + backend = CDLL(ctypes.util.find_library('mpv')) class MpvHandle(c_void_p): |