操做I/O的能力是由操做系統的提供的,每一種編程語言都會把操做系統提供的低級C接口封裝起來供開發者使用,Python也不例外。編程
encoding is the name of the encoding used to decode or encode the
file. This should only be used in text mode. The default encoding is
platform dependent, but any encoding supported by Python can be
passed. See the codecs module for the list of supported encodings.