⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compat.py

📁 一款基于web的项目管理、bug跟踪系统。提供了与svn集成的操作界面、问题跟踪
💻 PY
字号:
#!/usr/bin/pythonimport osimport shutil# Closing FDs not supported with subprocess on Windowsclose_fds = Trueif os.name == 'nt':    close_fds = False # not supported :(# On Windows, shutil.rmtree doesn't remove files with the read-only# attribute set, so this function explicitly removes it on every error# before retrying.  Even on Linux, shutil.rmtree chokes on read-only# directories, so we use this version in all cases.# Fix from http://bitten.edgewall.org/changeset/521def rmtree(root):    """Catch shutil.rmtree failures on Windows when files are read-only."""    def _handle_error(fn, path, excinfo):        os.chmod(path, 0666)        fn(path)    return shutil.rmtree(root, onerror=_handle_error)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -