Python 各模块用法大全(持续更新中)
程序员文章站
2022-07-02 18:45:47
...
1. 通过安装位置查找模块文件
.../Lib/**中可以查询各模块.py文件,例如(C:\Anaconda3\Lib\)
2. 编辑器中使用help()函数
'''以glob模块为例进行查询'''
import glob
help(glob)
'''输出
Help on module glob:
NAME
glob - Filename globbing utility.
FUNCTIONS
escape(pathname)
Escape all special characters.
glob(pathname, *, recursive=False)
Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
fnmatch. However, unlike fnmatch, filenames starting with a
dot are special cases that are not matched by '*' and '?'
patterns.
If recursive is true, the pattern '**' will match any files and
zero or more directories and subdirectories.
iglob(pathname, *, recursive=False)
Return an iterator which yields the paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
fnmatch. However, unlike fnmatch, filenames starting with a
dot are special cases that are not matched by '*' and '?'
patterns.
If recursive is true, the pattern '**' will match any files and
zero or more directories and subdirectories.
DATA
__all__ = ['glob', 'iglob', 'escape']
FILE
c:\anaconda3\lib\glob.py
'''
3. 各模块用法大全
上一篇: QT开发——QT tips(持续更新)
下一篇: axios请求