摘要: 先看os.walk(path)的返回值: `In [6]: for root_dir, dir_names, file_names in os.walk("C:\Users\Administrator"): ...: print(root_dir,type(root_dir)) ...: print 阅读全文
posted @ 2022-05-03 21:40 盈盈的月儿 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import argparse def _argparse(): parser = argparse.ArgumentParser(description='A Python-MySQL client') # 增加长参数required表示必填;action=store表示会把这个变量存起来,des 阅读全文
posted @ 2022-05-03 20:58 盈盈的月儿 阅读(217) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python3 # -*- coding: UTF-8 -*- import time import paramiko import smtplib from email.mime.text import MIMEText from email.header import He 阅读全文
posted @ 2022-01-10 11:49 盈盈的月儿 阅读(43) 评论(0) 推荐(0) 编辑
摘要: import paramiko import time class CONSSH: def __init__(self, host, username, password, port=22): self.__ssh = paramiko.SSHClient() self.__ssh.set_miss 阅读全文
posted @ 2021-01-18 22:13 盈盈的月儿 阅读(731) 评论(0) 推荐(0) 编辑
摘要: class A: def a(self, params): print("I from a, params is {}".format(params)) @staticmethod def b(params): print("I from b, params is {}".format(params 阅读全文
posted @ 2020-11-05 22:52 盈盈的月儿 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 1 import socket 2 3 4 class MyServer: 5 def __init__(self, ip, port): 6 self.socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 7 self.socket.b 阅读全文
posted @ 2020-08-16 17:19 盈盈的月儿 阅读(965) 评论(0) 推荐(0) 编辑
摘要: 下载即可用,这个是32位的,64位的貌似不好用,下载完了后直接在下载目录使用pip安装即可 "点击下载" 阅读全文
posted @ 2020-03-12 10:40 盈盈的月儿 阅读(775) 评论(1) 推荐(0) 编辑
摘要: 环境:python3.7 浏览器:火狐 在python scripts文件夹下边放入相应版本的geckodriver(或手动把geckodriver加入环境变量) 本脚本只适用于可以提前把抢购商品加入购物车的场景(实质是一个定时清空购物车的脚本) 新加特性 增加了隐式等待和拖动滚动轴操作,实现了全自 阅读全文
posted @ 2020-03-01 13:10 盈盈的月儿 阅读(11199) 评论(0) 推荐(1) 编辑
摘要: 修饰器的作用是:在function执行后,如果需要对函数的输出结果进行进一步的加工,则可以为函数增加一个修饰器 加上修饰器 修饰器的特点,一次编写,调用只需要加个@funciton,调用方便,一般用于给函数通用的步骤加装饰器 阅读全文
posted @ 2020-02-26 14:45 盈盈的月儿 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 下载 windows下载链接:http://ffmpeg.zeranoe.com/builds/ 直接下载稳定版本的就行 下载后解压缩 打开后直接在bin目录按shift+右击,在此处打开命令行界面(或者把bin目录添加为环境变量也可,方便使用,但是我懒 _<) 转换 压缩 转换后发现我转换出来的G 阅读全文
posted @ 2020-02-13 21:15 盈盈的月儿 阅读(1708) 评论(1) 推荐(0) 编辑