From 8d8b061fcc2b606c893c4fd460318a118b00ddbc Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 1 Jul 2016 13:12:02 +0200 Subject: Use ctypes.util.find_library to find libmpv. Thanks to @mozbugbox --- mpv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mpv.py b/mpv.py index 66ee030..8ee9826 100644 --- a/mpv.py +++ b/mpv.py @@ -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): -- cgit