08 2017 档案

摘要:一 multiprocessing模块介绍 python中的多线程无法利用多核优势,如果想要充分地使用多核CPU的资源(os.cpu_count()查看),在python中大部分情况需要使用多进程。Python提供了multiprocessing。 multiprocessing模块用来开启子进程, 阅读全文
posted @ 2017-08-31 23:43 ikere 阅读(987) 评论(1) 推荐(0)
摘要:作业:多用户在线的FTP程序 要求: README ### 功能实现 作业:开发一个支持多用户在线的FTP程序 要求: 用户加密认证 允许同时多用户登录 每个用户有自己的家目录 ,且只能访问自己的家目录 对用户进行磁盘配额,每个用户的可用空间不同 允许用户在ftp server上随意切换目录 允许用 阅读全文
posted @ 2017-08-25 10:01 ikere 阅读(219) 评论(0) 推荐(0)
摘要:一、模块补充 1. configparser模块 1 import configparser 2 3 config=configparser.ConfigParser() 4 config.read('a.ini') 5 6 #读取配置 7 print(config.sections()) #看标题 阅读全文
posted @ 2017-08-16 16:41 ikere 阅读(167) 评论(0) 推荐(0)
摘要:开发一个简单的python计算器 1 import sys 2 import re 3 4 def welcome_func(): 5 """ 6 输入判断 7 :param expression: 表达式 8 :return: 返回有效表达式 9 """ 10 welcome_str = "超级计 阅读全文
posted @ 2017-08-10 11:46 ikere 阅读(521) 评论(0) 推荐(0)
摘要:一、协程函数 yield的用法: 1 # 例子1 2 # def chi(name): 3 # print('%s 开始上菜啦~'%name) 4 # cd=[] #菜单 5 # while True: 6 # food=yield cd 7 # cd.append(food) 8 # print( 阅读全文
posted @ 2017-08-03 15:54 ikere 阅读(322) 评论(0) 推荐(0)