- 博客(8)
- 资源 (34)
- 收藏
- 关注
原创 Python UDP网络编程
Python UDP网络编程 UDP绑定对方IP和Port(通过bind()方法)后直接开始传输数据。 Server端编程 import socket udpServer = 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
285
原创 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创建一个socket server =s...
2020-11-18 11:26:16
243
原创 Python广度遍历文件
Python广度遍历文件(利用队列的先进先出思想,实现文件的广度遍历) import os import collections def 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
198
原创 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
313
转载 Python窗体控制相关方法
Python窗体控制相关方法 1.窗体的显示和隐藏 import win32con import win32gui # 以qq为例子,接收两个参数,一个是程序的类(class),一个是窗体的标题 qqWin = win32gui.FindWindow("TXGuifoundation", "QQ") # # 然后让窗体显示出来 win32gui.ShowWindow(qqWin, win32con.SW_SHOW) # 也可以让窗体消失 win32gui.ShowWindow(qqWin, w.
2020-11-10 10:52:01
655
原创 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
164
原创 Python文件操作相关方法
Python文件操作相关方法 File I/O open(path, falg[,encoding],[errors]) flag:打开方式 r - read only rb - open file in bite and read only r+ - open a file and can read and write w - open a file and write only wb - write only in bite w+ -- write and read a -- append cont
2020-11-09 23:13:10
637
原创 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
1201
Eclipse 的debug技术讲解
2008-10-12
javascript
2008-10-15
js框架 dojo.js
2009-07-18
J2EE,servlet,jsp等课件
2008-10-15
菜鸟级SQL21天自学通.pdf
2009-12-27
perl编程24小时教程
2009-12-27
js框架 jquery.js
2009-07-18
struts+hibernate+spring课件
2009-08-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅