From 4abcf173653ffc99047369e3b97d2e42a843e266 Mon Sep 17 00:00:00 2001 From: hongfeiyu Date: Mon, 6 Jun 2016 10:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D360=E7=9A=84=E5=8A=AB?= =?UTF-8?q?=E6=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- classroom.py | 8 ++++---- dormitory.py | 5 ++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1987de8..38552f5 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ - [ ] pyinstaller - [ ] 生成可执行文件 -- [ ] 中文乱码 \ No newline at end of file +- [ ] 添加一个只修改尾数的py diff --git a/classroom.py b/classroom.py index 4c96ff2..9e3271d 100644 --- a/classroom.py +++ b/classroom.py @@ -11,13 +11,13 @@ print u'没有找到可用的网络适配器' exit() for i in xrange(len(colNicConfigs)): + objNicConfig = colNicConfigs[i] + print objNicConfig.Index + print objNicConfig.SettingID + print objNicConfig.Description.encode("cp936") if colNicConfigs[i].SettingID=='{B324793C-DD04-43BB-8DD0-B17BCBED9DC2}' : - objNicConfig = colNicConfigs[i] break print u"无线网卡信息: " -#print objNicConfig.Index -#print objNicConfig.SettingID -#print objNicConfig.Description.encode("cp936") print u'IP: ', ', '.join(objNicConfig.IPAddress) if objNicConfig.DefaultIPGateway!=None and objNicConfig.DNSServerSearchOrder!=None: print u'掩码: ', ', '.join(objNicConfig.IPSubnet) diff --git a/dormitory.py b/dormitory.py index e094295..80b65a4 100644 --- a/dormitory.py +++ b/dormitory.py @@ -13,8 +13,11 @@ print u'没有找到可用的网络适配器' exit() for i in xrange(len(colNicConfigs)): + objNicConfig = colNicConfigs[i] + print objNicConfig.Index + print objNicConfig.SettingID + print objNicConfig.Description.encode("cp936") if colNicConfigs[i].SettingID=='{5240CB7A-FA58-4A5A-8C1A-8C8300AAE22B}' : - objNicConfig = colNicConfigs[i] break print u"以太网卡信息: " #print objNicConfig.Index