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