摘要: 服务器程序: 1 #!/usr/bin/python 2 3 import socket 4 5 HOST='' 6 PORT=8008 7 ADDR=(HOST,PORT) 8 BUFSIZ=8096 9 10 SerSock=socket.socket(socket.AF_INET,sock... 阅读全文
posted @ 2015-06-09 18:09 tmyyss 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 这是《Python核心编程(中的文第二版)》的一个习题,题目要求服务器能识别以下命令:ls 返回服务器程序当前目录os 返回服务器操作系统的信息date 得到服务器当前的时间ls dir 返回目录dir的文件列表服务器程序: 1 import time 2 import os 3 import da... 阅读全文
posted @ 2015-06-09 18:03 tmyyss 阅读(268) 评论(0) 推荐(0) 编辑