欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-07-02 18:45:47
...

1. 通过安装位置查找模块文件

.../Lib/**中可以查询各模块.py文件,例如(C:\Anaconda3\Lib\

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

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模块

相关标签: Python