小陆同学

python 中文名:蟒蛇,设计者:Guido van Rossum

导航

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 23 下一页

2020年2月18日 #

jquery--获取多选框的值、获取下拉多选框的值

摘要: 获取多选框的值 var packageCodeList=new Array(); $('#server_id:checked').each(function(){ packageCodeList.push($(this).val());//向数组中添加元素 }); console.log(packa 阅读全文

posted @ 2020-02-18 17:56 小陆同学 阅读(1946) 评论(0) 推荐(0) 编辑

2020年2月17日 #

python--脚本传参与shell脚本传参(位置参数)

摘要: 写一个最简单的shell脚本,了解shell脚本是如何传参 1、 vim test1.sh name=$1 age=$2 echo ${name} echo ${age} View Code 2.调用脚本并传参 sh test1.sh zhangsan 14 11、 vim test1.py tes 阅读全文

posted @ 2020-02-17 17:24 小陆同学 阅读(1245) 评论(0) 推荐(0) 编辑

python--一起来盖个时间戳!!

摘要: 1、datetime import datetime print(datetime.datetime.now()) 2、time import time otherStyleTime = time.strftime("%Y/%m/%d %H:%M:%S", time.localtime()) pri 阅读全文

posted @ 2020-02-17 10:56 小陆同学 阅读(222) 评论(0) 推荐(0) 编辑

2020年2月13日 #

python--多线程的应用

摘要: python 多线程执行函数,以及调用函数时传参 import threading def func1(): print('this is function1') def func2(x,y): print('this is function2') print(x+y) threads = [] t 阅读全文

posted @ 2020-02-13 13:57 小陆同学 阅读(219) 评论(0) 推荐(0) 编辑

2020年2月12日 #

python-局域网内实现web页面用户端下载文件,easy!

摘要: 好久没有发博客了,但是也没闲着,最近疫情原因一直在家远程办公,分享一下今天的干货 先说需求:某个文件压缩之后可以供用户点击下载 没想到特别好的办法,在网上搜索大多都是通过socket实现的,然后我这个好久没写服务端和客户端的家伙开始了奋笔疾书,使劲粘贴,源码附上: 注意!!!启动时:先服务端,后客户 阅读全文

posted @ 2020-02-12 22:32 小陆同学 阅读(1088) 评论(0) 推荐(1) 编辑

2020年1月17日 #

python--读取excel通过django框架入库mysql(完整代码)

摘要: import xlrd , uuidclass JenkinsImport(View): def get(self,request): xls = xlrd.open_workbook('./test.xls') sheets = xls.sheet_names() # 所有sheet,列表 tab 阅读全文

posted @ 2020-01-17 23:14 小陆同学 阅读(684) 评论(0) 推荐(0) 编辑

python--读取Excel内容

摘要: import xlrd def extract(inpath): data = xlrd.open_workbook(inpath, encoding_override='utf-8') table = data.sheets()[0] # 选定表 nrows = table.nrows # 获取行 阅读全文

posted @ 2020-01-17 23:09 小陆同学 阅读(334) 评论(0) 推荐(0) 编辑

python--正则匹配首尾标签中间的内容

摘要: import re it = re.finditer(r"<url>.*?</url>", '被筛选字符串') # 匹配url标签里的内容 # it = re.finditer(r"<command>.*?</command>", con) # 匹配标签里的内容,有换行符\n导致匹配失败 it2 = 阅读全文

posted @ 2020-01-17 23:07 小陆同学 阅读(2657) 评论(0) 推荐(0) 编辑

python--re 常用正则表达式(转载)

摘要: # import re # # 从头匹配,失败返回None # line = "this hdr-biz 123 model server 456" # pattern = r"123" # matchObj = re.match(pattern, line) # print(matchObj) # 阅读全文

posted @ 2020-01-17 23:02 小陆同学 阅读(446) 评论(0) 推荐(0) 编辑

python--将jenkins配置的任务导出到Excel

摘要: jenkins任务全部导出到Excel,完整代码 from jenkins import Jenkins import xlwt,re jen = Jenkins(url="jenkins路由地址", username="用户名", password="密码") all_jobs = jen.get 阅读全文

posted @ 2020-01-17 22:59 小陆同学 阅读(1127) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 23 下一页