python 查看某个模块都有什么方法
1.看官方文档 https://docs.python.org/3/search.html?q=os&check_keywords=yes&area=default
2.看源码
3.dir()
import requests,os,random
print(dir(random))
# ['BPF', 'LOG4', 'NV_MAGICCONST', 'RECIP_BPF', 'Random', 'SG_MAGICCONST', 'SystemRandom',
# 'TWOPI', '_BuiltinMethodType', '_MethodType', '_Sequence', '_Set', '__all__', '__builtins__',
# '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_acos',
# '_ceil', '_cos', '_e', '_exp', '_inst', '_log', '_pi', '_random', '_sha512', '_sin', '_sqrt', '_test',
# '_test_generator', '_urandom', '_warn', 'betavariate', 'choice', 'expovariate', 'gammavariate', 'gauss',
# 'getrandbits', 'getstate', 'lognormvariate', 'normalvariate', 'paretovariate', 'randint', 'random', 'randrange',
# 'sample', 'seed', 'setstate', 'shuffle', 'triangular', 'uniform', 'vonmisesvariate', 'weibullvariate']
python 查看某个模块都有什么方法的更多相关文章
- python 查看导入模块的函数和方法
将twain.pyd复制到Python27 \ Lib \ site-packages 首先 import XXX(包括pyd的文件名)print(dir(XXX))print(help(xxx)) ...
- python之序列化模块、双下方法(dict call new del len eq hash)和单例模式
摘要:__new__ __del__ __call__ __len__ __eq__ __hash__ import json 序列化模块 import pickle 序列化模块 补充: 现在我们都应 ...
- Python的re模块,正则表达式书写方法
Python的re模块,正则表达式 #导入re模块 import re 1.match方法的使用: result = re.match(正则表达式,待匹配的字符串) 正则表达式写法: 第一部分: 字 ...
- 用法:node模块都具备的方法(exports、module、require、__filename、__dirname)
凡是玩弄nodejs的人,都明白,每一个模块都有exports.module.require.__filename.__dirname的方法 清楚了解方法的用法后,玩转node就等于清楚了日常讲话的内 ...
- python标准日志模块logging的使用方法
参考地址 最近写一个爬虫系统,需要用到python的日志记录模块,于是便学习了一下.python的标准库里的日志系统从Python2.3开始支持.只要import logging这个模块即可使用.如果 ...
- python中计时模块timeit的使用方法
timeit 模块: timeit 模块定义了接受两个参数的 Timer 类.两个参数都是字符串. 第一个参数是你要计时的语句或者函数. 传递给 Timer 的第二个参数是为第一个参数语句构建环境的导 ...
- python 动态调用模块、类、方法(django项目)
需求:近一段时间基于django框架,开发各业务层监控代码,每个业务的监控逻辑不同,因此需要开发监控子模块,动态的导入调用. 项目名称:demo_django App:common_base.moni ...
- python中re模块的match,search方法的比较
match 匹配字符串的开头, search匹配整个字符串
- Python爬虫之使用Fiddler+Postman+Python的requests模块爬取各国国旗
介绍 本篇博客将会介绍一个Python爬虫,用来爬取各个国家的国旗,主要的目标是为了展示如何在Python的requests模块中使用POST方法来爬取网页内容. 为了知道POST方法所需要传 ...
随机推荐
- 修改Linux命令的别名:alias
修改Linux命令的别名. (一)临时生效:仅限当前窗口 查看所有别名 alias 添加别名 alias ll='ls -lh' 重置别名 alias ll='ls -alh' 删除别名: unali ...
- 解决mysql登录警告问题
一.前言 我们在登录mysql的时候经常会看到一句警告: Warning: Using a password on the command line interface can be insecure ...
- 18.父组件给子组件传值&方法
1.父组件给子组件传值 2.父组件把方法传递给子组件
- Nginx.conf配置文件默认配置块略解
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #erro ...
- jmeter 5.1.1版本 进行抓包的时候弹出输入密码
先描述一下如何配置Jmeter 先新建一个Thread Group,比如我命令为抓包 新建一个HTTP(S) Test Script Recorder,进行如下的配置, 配置端口,我这边设置为8899 ...
- rabbitMq实现延时队列
原文:https://my.oschina.net/u/3266761/blog/1926588 rabbitMq是受欢迎的消息中间件之一,相比其他的消息中间件,具有高并发的特性(天生具备高并发高可用 ...
- frp服务搭建
安装命令 C wget --no-check-certificate https://raw.githubusercontent.com/clangcn/onekey-install-shell/ma ...
- springboot 配置 中查找application.properties中对应的数据,添加对应的prefix前缀
@ConditionalOnProperty(prefix = "spring.redis", name = "enabled", havingValue = ...
- jFinal的小知识点总结
sql批处理 // 批处理sql List<String> sqlList = new ArrayList<String>(); sqlList.add("delet ...
- 云计算(6)--一些MapReduce的例子
例1:文件的字符串查找 这里reduce不做merge的工作,因为每行都是不一样的,不能merge. 与传统的grep程序相比,使用MapReduce可以加快处理,因为1它是Distributed的, ...