| Server IP : 123.56.80.60 / Your IP : 216.73.216.78 Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586 User : SYSTEM ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/python/Lib/site-packages/win32/lib/ |
Upload File : |
# Imported by pywin32.pth to bootstrap the pywin32 environment in "portable"
# environments or any other case where the post-install script isn't run.
#
# In short, there's a directory installed by pywin32 named 'pywin32_system32'
# with some important DLLs which need to be found by Python when some pywin32
# modules are imported.
# If Python has `os.add_dll_directory()`, we need to call it with this path.
# Otherwise, we add this path to PATH.
import os
import site
# The directory should be installed under site-packages.
dirname = os.path.dirname
# This is to get the "...\Lib\site-packages" directory
# out of this file name: "...\Lib\site-packages\win32\Lib\pywin32_bootstrap.py".
# It needs to be searched when installed in virtual environments.
level3_up_dir = dirname(dirname(dirname(__file__)))
site_packages_dirs = getattr(site, "getsitepackages", lambda: [])()
if level3_up_dir not in site_packages_dirs:
site_packages_dirs.insert(0, level3_up_dir)
for site_packages_dir in site_packages_dirs:
pywin32_system32 = os.path.join(site_packages_dir, "pywin32_system32")
if os.path.isdir(pywin32_system32):
if hasattr(os, "add_dll_directory"):
os.add_dll_directory(pywin32_system32)
# This is to ensure the pywin32 path is in the beginning to find the
# pywin32 DLLs first and prevent other PATH entries to shadow them
elif not os.environ["PATH"].startswith(pywin32_system32):
os.environ["PATH"] = os.environ["PATH"].replace(os.pathsep + pywin32_system32, "")
os.environ["PATH"] = pywin32_system32 + os.pathsep + os.environ["PATH"]
break