Python 各模块用法大全(持续更新中)

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. 各模块用法大全

glob模块

os模块

Numpy模块

turtle模块

发布了93 篇原创文章 · 获赞 2 · 访问量 3053

猜你喜欢

转载自blog.csdn.net/qq_40041064/article/details/104689441