mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
add jaraco to test sym links on Windows. Fixes #894
This commit is contained in:
parent
fd5ee775e0
commit
52cc753881
50 changed files with 3862 additions and 7 deletions
20
libs/jaraco/windows/lib.py
Normal file
20
libs/jaraco/windows/lib.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import ctypes
|
||||
|
||||
from .api import library
|
||||
|
||||
def find_lib(lib):
|
||||
r"""
|
||||
Find the DLL for a given library.
|
||||
|
||||
Accepts a string or loaded module
|
||||
|
||||
>>> print(find_lib('kernel32').lower())
|
||||
c:\windows\system32\kernel32.dll
|
||||
"""
|
||||
if isinstance(lib, str):
|
||||
lib = getattr(ctypes.windll, lib)
|
||||
|
||||
size = 1024
|
||||
result = ctypes.create_unicode_buffer(size)
|
||||
library.GetModuleFileName(lib._handle, result, size)
|
||||
return result.value
|
Loading…
Add table
Add a link
Reference in a new issue