nginx模块模块配置使用(http_stub_status_module,http_random_index_module,http_sub_module,连接频率限制:limit_conn_module 请求频率限制:limit_req_module,http_access_module)nginx模块官方模块(默认支持)第三方模块1. --with-http_stub_status_m
原创 2017-10-08 21:23:00
338阅读
nginx模块模块配置使用(http_stub_status_module,http_random_index_module,http_sub_module,连接频率限制:limit_conn_module 请求频率限制:limit_req_module,http_access_module)
原创 2021-07-05 15:53:25
696阅读
subprocess模块使用
原创 2016-12-16 16:50:25
432阅读
在setting中standard_format = '%(asctime)s - task:%(name)s - %(filename)s:%(lineno)d -' \                  ' %(levelname)s : [%(message)s]'sim
原创 2019-01-17 07:29:52
488阅读
查看ansible都有哪些模块:查看模块用法:fetch模块:将受管主机中文件拉取到ansible主机上。执行完之后,会自动创建192.168.116.152/etc/这个目录,并将拉取来文件放到这个目录下。当返回信息为绿色,change为false,表示ansible没有进行任何操作,没有改变什么。当返回信息为×××,change为true,表示ansible执行了操作,当前状态已经被ani
原创 2019-04-13 14:18:25
555阅读
一、requests使用 安装:pip install requests get请求 1、发送 get 请求 import requests header = { 'referer': 'https://www.baidu.com' } # 请求并获取返回结果 re = requests.get( ...
转载 2021-08-19 22:20:00
86阅读
2评论
Python之IO模块使用 1.StringIO使用 # 类似文件缓冲区 from io import StringIO cache_file = StringIO() print(cache_file.write('hello world')) # 11 print(cache_file.s ...
转载 2021-08-06 14:36:00
245阅读
2评论
pytest模块使用 pytest是第三方测试框架,是基于unittest扩展框架,比unittest更简洁,更高效。 安装pytest模块使用 pip install pytest 安装好之后,到cmd中输入 pytest --version 检查是否安装成功。 pytest运行方法 想要用pytest运行,首先要导入模块 import pytest 比如创建一个demo.p
转载 2021-04-13 14:53:00
176阅读
2评论
在NodeJS中,每个js文件就是一个模块,而文件路径就是模块名, 在编写每个模块时,都有require、exports、module三个预先定义好变量可供使用。 require函数用于在当前模块中加载和使用别的模块,其中js扩展名可省略,require多次不会重复初始化,如果传递给require Read More
转载 2016-08-06 10:29:00
122阅读
2评论
paramiko是用python语言写一个模块,遵循SSH2协议,支持以加密和认证方式,进行远程服务器连接。一安装步骤:a、安装vcforpython2.7下载地址://www.microsoft.com/en-gb/download/details.aspx?id=44266b、安装PyCrypto模块pipinstallPyCryptoc、安装paramiko模块pipinsta
转载 2018-02-26 17:49:40
1376阅读
简介 生成临时身份令牌(通过邮件让用户注册激活时候地址当中带有用户信息。但是信息
原创 2022-06-17 06:49:51
157阅读
urllib模块使用,这个是用来读取指定url,然后读取其内容:In [19]: import urllib In [20]: url_file=urllib.urlopen("http://baike.baidu.com/view/21087.htm?fr=aladdin") In [21]: url_file.close
原创 2014-09-28 22:52:18
580阅读
什么是模块模块是一系列功能集合体常见模块形式(自定义模块、第三方模块、内置模块):1、一个module.py文件就是一个模块,文件名是module.py,而模块名是module2、一个包含有__init__.py文件文件夹也是模块3、已被编译为共享库或DLLC或C++扩展4、使用C编写并链接到python解释器内置模块为什么要用模块1、用第三方或者内置模块是一种拿来主义,可以极大地提升
原创 2018-07-30 20:23:05
594阅读
fnmatch模块使用
转载 2021-07-13 13:43:33
130阅读
fnmatch模块使用模块主要作用是文件名称匹配,并且匹配模式使用unix shell风格。fnmatch比较简单就4个方法分别是:fnmatch,fnmatchcase,filter,translate
转载 2021-07-13 17:08:40
206阅读
glob模块 功能描述:glob模块可以使用Unix shell风格通配符匹配符合特定格式文件和文件夹,跟windows文件搜索功能差不多。glob模块并非调用一个子shell实现搜索功能,而是在内部调用了os.listdir()和fnmatch.fnmatch()。查看我之前写fnmatch。 glob模块共包含以下3个函数:glob,isglob和escape。 glob(path
转载 2018-07-04 09:52:00
189阅读
2评论
fnmatch模块使用模块主要作用是文件名称匹配,并且匹配模式使用unix shell风格。fnmatch比较简单就4个方法分别是:fnmatch,fnmatchcase,filter,translate 1.fnmatch fnmatch.fnmatch(filename, pattern)测试filename,是否符合pattern。 import fnmatchimp
转载 2018-07-04 09:03:00
81阅读
2评论
import paramiko client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostname="8.140.144.184",por ...
转载 2021-10-19 15:09:00
99阅读
2评论
linecache模块是python自带模块,下面简单记录下其使用方法:import linecache linecache.getlines(filename)            #从名为filename文件中得到全部内容,输出为列表格式,以文件每行为列表中
原创 2014-11-25 17:22:26
1594阅读
  • 1
  • 2
  • 3
  • 4
  • 5