摘要: 转载于:https://blog.csdn.net/rebelqsp/article/details/22109925 1、Socket 类型 套接字格式: socket(family,type[,protocal]) 使用给定的地址族、套接字类型、协议编号(默认为0)来创建套接字。 socket类 阅读全文
posted @ 2018-08-30 11:08 i11USi0n 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 总体思路: 调用了socket模块并用connect()函数链接了相应的IP和端口号,用send()函数发送数据并用recv()函数检查响应. 1 # -*- coding:utf-8 -*- 2 3 __author__='Dou—wei' 4 5 import socket 6 import s 阅读全文
posted @ 2018-08-30 10:45 i11USi0n 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 总体思路: os.path.abspath('.') #获取当前路径 os.listdir #获取指定的文件夹包含的文件或文件夹的名字的列表 os.path.join #用获取的文件名拼接路径 os.path.isdir #判断路径是否为目录,用于递归 1 # -*- coding:utf-8 -* 阅读全文
posted @ 2018-08-30 00:22 i11USi0n 阅读(197) 评论(0) 推荐(0) 编辑