Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1346|回复: 0
打印 上一主题 下一主题

python资料查找方法

[复制链接]

1228

主题

1997

帖子

7580

积分

认证用户组

Rank: 5Rank: 5

积分
7580
跳转到指定楼层
楼主
发表于 2020-12-19 20:33:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
https://www.python.org/doc/
Python 3.x Resources
https://docs.python.org/3/tutorial/index.html

11. Brief Tour of the Standard Library — Part II


11.5. Logging
The logging module offers a full featured and flexible logging system. At its simplest, log messages are sent to a file or to sys.stderr:

这个  logging
https://docs.python.org/3/library/logging.html#module-logging

Format
Description

filename
Specifies that a FileHandler be created, using the specified filename, rather than a StreamHandler.

filemode
If filename is specified, open the file in this mode. Defaults to 'a'.
点这个 mode
Character
Meaning

'r'
open for reading (default)

'w'
open for writing, truncating the file first

'x'
open for exclusive creation, failing if the file already exists

'a'
open for writing, appending to the end of the file if it exists

'b'
binary mode

't'
text mode (default)

'+'
open for updating (reading and writing)



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-4-30 00:24 , Processed in 0.055701 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表