HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Python311/Lib/site-packages/send2trash/win/__init__.py
# Copyright 2017 Virgil Dupras

# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license

from __future__ import unicode_literals
from platform import version

# if windows is vista or newer and pywin32 is available use IFileOperation
if int(version().split(".", 1)[0]) >= 6:
    try:
        # Attempt to use pywin32 to use IFileOperation
        from send2trash.win.modern import send2trash
    except ImportError:
        # use SHFileOperation as fallback
        from send2trash.win.legacy import send2trash
else:
    # use SHFileOperation as fallback
    from send2trash.win.legacy import send2trash  # noqa: F401