Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我使用 Python ZipFile 库解压缩 Zip 文件,该文件是在 Windows 上创建的,但我的代码在类 Unix 上运行,那么路径分隔符是否总是 Unix 样式?
在内部,ZipFile 按照zip 文件规范的要求存储正斜杠。
在外部,它们使用os.sep进行翻译,因此它将与给定平台上通常预期的内容相匹配。
代码参考: