Skip to content

Commit 2e6ae42

Browse files
committed
Use correct shared library name on Windows
Closes #4.
1 parent dcb324c commit 2e6ae42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

openslide/lowlevel.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@
3232
from ctypes import *
3333
from itertools import count
3434
import PIL.Image
35+
import platform
3536
import sys
3637

37-
_lib = cdll.LoadLibrary('libopenslide.so.0')
38+
if platform.system() == 'Windows':
39+
_lib = cdll.LoadLibrary('libopenslide-0.dll')
40+
else:
41+
_lib = cdll.LoadLibrary('libopenslide.so.0')
3842

3943
class OpenSlideError(Exception):
4044
"""An error produced by the OpenSlide library.

0 commit comments

Comments
 (0)