Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced content levelIntermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
io 模組
|
313
zlib
)。 v3 也支援 LZMA 壓縮,例如
xz
程式所用的:我們在本書中不
涵蓋,但請參閱線上文件(
https://docs.python.org/3/library/lzma.html
)與
PyPI
https://pypi.python.org/pypi/backports.lzma
)所提供的v2 後向移植
backport)版。
Python 中,
os
模組提供了許多會作用在檔案系統上的函式,所以本章
接著會在「os 模組」中介紹
os
模組。然後本章在「檔案系統作業」中涵
os
所提供的在檔案系統上進行的作業(目錄與檔案的比較、複製與刪
除、處理檔案路徑,以及存取低階檔案描述器,涵蓋於「os 模組的檔案
與目錄函式」中)、
os.path
(「 os.path 模組」),以及其他的模組(
listdir
底下的
dircache
,在表 10-3 ,「 stat 模組」中的
stat
,「 filecmp 模組」
中的
filecmp
,「 fnmatch 模組」中的
fnmatch
,「 glob 模組」中的
glob
以及「shutil 模組」中的
shutil
)。我們並沒有涵蓋模組
pathlib
,它為檔
案系統的路徑提供了物件導向的處理方式,在本文寫作之時,它只是
時性
provisional
的包含在標準程式庫中,代表它可能會有回溯不相容
backward-incompatible)的變更,甚至是整個套件的移除,如果你無論
如何都想要試試看它,請參閱線上文件(
https://docs.python.or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

測試驅動開發|使用 Python

測試驅動開發|使用 Python

Harry J.W. Percival
Linux 内核观测技术BPF

Linux 内核观测技术BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 9789864766819