- 博客(8)
- 资源 (34)
- 收藏
- 关注
原创 Python UDP网络编程
Python UDP网络编程UDP绑定对方IP和Port(通过bind()方法)后直接开始传输数据。Server端编程import socketudpServer = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)ip_port = ('192.168.1.7',8081)udpServer.bind(ip_port)print('server is up')#recvfrom可以同时拿到ip和返回的数据while True
2020-11-18 11:38:41
169
原创 Python TCP 网络编程
Python TCP 网络编程socket通信创建过程 首先:创建Socket,涉及到的主要参数有:domain、type、protocal。 domain是协议域,其中AF_INET->IPv4;AF_INET6->IPv6 。 type对应socket类型,SOCK_STREAM->TCP;SOCK_DGRAM->UDP。server端编程:import socket#1创建一个socketserver =s...
2020-11-18 11:26:16
179
原创 Python广度遍历文件
Python广度遍历文件(利用队列的先进先出思想,实现文件的广度遍历)import osimport collectionsdef getAllDirQuene(path): quene = collections.deque() quene.append(path) while len(quene) != 0: dirPath = quene.pop() fileList = os.listdir(dirPath) f
2020-11-10 16:25:50
153
原创 Python文件遍历
Python文件遍历重点:以下两个方法里面的path都是绝对路径。os.path.isDir(path)os.path.isFile(Path)深度遍历文件代码如下(借用栈的后进先出的思想实现给定path下文件的遍历):import os#新建一个列表stack = []def getAllDirDep(path): stack.append(path) print('**stack element:',stack) while len(stack) .
2020-11-10 14:42:45
266
转载 Python窗体控制相关方法
Python窗体控制相关方法1.窗体的显示和隐藏import win32conimport win32gui# 以qq为例子,接收两个参数,一个是程序的类(class),一个是窗体的标题qqWin = win32gui.FindWindow("TXGuifoundation", "QQ") # # 然后让窗体显示出来win32gui.ShowWindow(qqWin, win32con.SW_SHOW)# 也可以让窗体消失win32gui.ShowWindow(qqWin, w.
2020-11-10 10:52:01
589
原创 Python操作系统相关方法
PythonOS相关方法#os包含了操作系统的功能import os#os.相关方法#操作系统名称print('os.name(系统名称):',os.name)#print('os.uname',os.uname)print('os.environ(系统环境变量)',os.environ)#获取系统某个环境变量para = os.environ.get("APPDATA")print(para)#print('os.curdir',os.curdir())#get当前工作空间.
2020-11-09 23:17:41
118
原创 Python文件操作相关方法
Python文件操作相关方法File I/Oopen(path, falg[,encoding],[errors])flag:打开方式r - read onlyrb - open file in bite and read onlyr+ - open a file and can read and writew - open a file and write onlywb - write only in bitew+ -- write and reada -- append cont
2020-11-09 23:13:10
564
原创 Python安装文件报SSL错误的解决方法
Python安装文件报SSL错误的解决方法Pythonpip安装扩展包或软件时,报如下错误:'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)解决方法:(以安装pywin32包为例)将pip install pywin32改成(增加红色字体部分):pip install --trusted-host=pypi.python.org...
2020-11-09 20:24:28
1044
js框架 jquery.js
2009-07-18
js框架 dojo.js
2009-07-18
J2EE,servlet,jsp等课件
2008-10-15
javascript
2008-10-15
Eclipse 的debug技术讲解
2008-10-12
perl编程24小时教程
2009-12-27
菜鸟级SQL21天自学通.pdf
2009-12-27
struts+hibernate+spring课件
2009-08-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人