﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-alantop's blog -随笔分类-Python</title><link>http://www.cppblog.com/alantop/category/21240.html</link><description>量化趋势交易</description><language>zh-cn</language><lastBuildDate>Sun, 08 Sep 2019 12:37:58 GMT</lastBuildDate><pubDate>Sun, 08 Sep 2019 12:37:58 GMT</pubDate><ttl>60</ttl><item><title>运行pip 出现Fatal error in launcher：Unable to create process using 错误的解决方法</title><link>http://www.cppblog.com/alantop/archive/2019/09/08/216802.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 08 Sep 2019 10:02:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2019/09/08/216802.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216802.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2019/09/08/216802.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216802.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216802.html</trackback:ping><description><![CDATA[造成此原因是安装了多个版本，冲突。<br />python3下<br /><br /><strong style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; background-color: #fefef2;"><span style="margin: 0px; padding: 0px; line-height: 1.5; font-size: 16px;">python -m pip install --upgrade pip</span></strong><img src ="http://www.cppblog.com/alantop/aggbug/216802.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2019-09-08 18:02 <a href="http://www.cppblog.com/alantop/archive/2019/09/08/216802.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>pycharm 2019.2.1 注册方法</title><link>http://www.cppblog.com/alantop/archive/2019/09/08/216799.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 08 Sep 2019 01:44:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2019/09/08/216799.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216799.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2019/09/08/216799.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216799.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216799.html</trackback:ping><description><![CDATA[<div>菜单中编辑<br />-javaagent:C:\Program Files\JetBrains\PyCharm 2019.2.1\bin\jetbrains-agent.jar<br /><br />输入注册码<br /><div>3AGXEJXFK9-eyJsaWNlbnNlSWQiOiIzQUdYRUpYRks5IiwibGljZW5zZWVOYW1lIjoiaHR0cHM6Ly96aGlsZS5pbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiIiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwiZmFsbGJhY2tEYXRlIjoiMjA4OS0wNy0wNyIsInBhaWRVcFRvIjoiMjA4OS0wNy0wNyJ9LHsiY29kZSI6IkFDIiwiZmFsbGJhY2tEYXRlIjoiMjA4OS0wNy0wNyIsInBhaWRVcFRvIjoiMjA4OS0wNy0wNyJ9LHsiY29kZSI6IkRQTiIsImZhbGxiYWNrRGF0ZSI6IjIwODktMDctMDciLCJwYWlkVXBUbyI6IjIwODktMDctMDcifSx7ImNvZGUiOiJQUyIsImZhbGxiYWNrRGF0ZSI6IjIwODktMDctMDciLCJwYWlkVXBUbyI6IjIwODktMDctMDcifSx7ImNvZGUiOiJHTyIsImZhbGxiYWNrRGF0ZSI6IjIwODktMDctMDciLCJwYWlkVXBUbyI6IjIwODktMDctMDcifSx7ImNvZGUiOiJETSIsImZhbGxiYWNrRGF0ZSI6IjIwODktMDctMDciLCJwYWlkVXBUbyI6IjIwODktMDctMDcifSx7ImNvZGUiOiJDTCIsImZhbGxiYWNrRGF0ZSI6IjIwODktMDctMDciLCJwYWlkVXBUbyI6IjIwODktMDctMDcifSx7ImNvZGUiOiJSUzAiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiUkMiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiUkQiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiUEMiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiUk0iLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiV1MiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiREIiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiREMiLCJmYWxsYmFja0RhdGUiOiIyMDg5LTA3LTA3IiwicGFpZFVwVG8iOiIyMDg5LTA3LTA3In0seyJjb2RlIjoiUlNVIiwiZmFsbGJhY2tEYXRlIjoiMjA4OS0wNy0wNyIsInBhaWRVcFRvIjoiMjA4OS0wNy0wNyJ9XSwiaGFzaCI6IjEyNzk2ODc3LzAiLCJncmFjZVBlcmlvZERheXMiOjcsImF1dG9Qcm9sb25nYXRlZCI6ZmFsc2UsImlzQXV0b1Byb2xvbmdhdGVkIjpmYWxzZX0=-WGTHs6XpDhr+uumvbwQPOdlxWnQwgnGaL4eRnlpGKApEEkJyYvNEuPWBSrQkPmVpim/8Sab6HV04Dw3IzkJT0yTc29sPEXBf69+7y6Jv718FaJu4MWfsAk/ZGtNIUOczUQ0iGKKnSSsfQ/3UoMv0q/yJcfvj+me5Zd/gfaisCCMUaGjB/lWIPpEPzblDtVJbRexB1MALrLCEoDv3ujcPAZ7xWb54DiZwjYhQvQ+CvpNNF2jeTku7lbm5v+BoDsdeRq7YBt9ANLUKPr2DahcaZ4gctpHZXhG96IyKx232jYq9jQrFDbQMtVr3E+GsCekMEWSD//dLT+HuZdc1sAIYrw==-MIIElTCCAn2gAwIBAgIBCTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBMB4XDTE4MTEwMTEyMjk0NloXDTIwMTEwMjEyMjk0NlowaDELMAkGA1UEBhMCQ1oxDjAMBgNVBAgMBU51c2xlMQ8wDQYDVQQHDAZQcmFndWUxGTAXBgNVBAoMEEpldEJyYWlucyBzLnIuby4xHTAbBgNVBAMMFHByb2QzeS1mcm9tLTIwMTgxMTAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5ndaik1GD0nyTdqkZgURQZGW+RGxCdBITPXIwpjhhaD0SXGa4XSZBEBoiPdY6XV6pOfUJeyfi9dXsY4MmT0D+sKoST3rSw96xaf9FXPvOjn4prMTdj3Ji3CyQrGWeQU2nzYqFrp1QYNLAbaViHRKuJrYHI6GCvqCbJe0LQ8qqUiVMA9wG/PQwScpNmTF9Kp2Iej+Z5OUxF33zzm+vg/nYV31HLF7fJUAplI/1nM+ZG8K+AXWgYKChtknl3sW9PCQa3a3imPL9GVToUNxc0wcuTil8mqveWcSQCHYxsIaUajWLpFzoO2AhK4mfYBSStAqEjoXRTuj17mo8Q6M2SHOcwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQBonMu8oa3vmNAa4RQP8gPGlX3SQaA3WCRUAj6Zrlk8AesKV1YSkh5D2l+yUk6njysgzfr1bIR5xF8eup5xXc4/G7NtVYRSMvrd6rfQcHOyK5UFJLm+8utmyMIDrZOzLQuTsT8NxFpbCVCfV5wNRu4rChrCuArYVGaKbmp9ymkw1PU6+HoO5i2wU3ikTmRv8IRjrlSStyNzXpnPTwt7bja19ousk56r40SmlmC04GdDHErr0ei2UbjUua5kw71Qn9g02tL9fERI2sSRjQrvPbn9INwRWl5+k05mlKekbtbu2ev2woJFZK4WEXAd/GaAdeZZdumv8T2idDFL7cAirJwcrbfpawPeXr52oKTPnXfi0l5+g9Gnt/wfiXCrPElX6ycTR6iL3GC2VR4jTz6YatT4Ntz59/THOT7NJQhr6AyLkhhJCdkzE2cob/KouVp4ivV7Q3Fc6HX7eepHAAF/DpxwgOrg9smX6coXLgfp0b1RU2u/tUNID04rpNxTMueTtrT8WSskqvaJd3RH8r7cnRj6Y2hltkja82HlpDURDxDTRvv+krbwMr26SB/40BjpMUrDRCeKuiBahC0DCoU/4+ze1l94wVUhdkCfL0GpJrMSCDEK+XEurU18Hb7WT+ThXbkdl6VpFdHsRvqAnhR2g4b+Qzgidmuky5NUZVfEaZqV/g==</div></div><img src ="http://www.cppblog.com/alantop/aggbug/216799.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2019-09-08 09:44 <a href="http://www.cppblog.com/alantop/archive/2019/09/08/216799.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 获取硬件信息 加密 注册功能</title><link>http://www.cppblog.com/alantop/archive/2019/01/06/216170.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 06 Jan 2019 04:51:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2019/01/06/216170.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216170.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2019/01/06/216170.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216170.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216170.html</trackback:ping><description><![CDATA[代码下载： https://github.com/alantop0720/PythonCommon/blob/master/getpcinfo.py<br /><br /><div>import os, sys</div><div>import wmi</div><div>import hashlib</div><div>import base64</div><div>c = wmi.WMI()</div><div>#处理器</div><div>def printCPU():</div><div>&nbsp; &nbsp; tmpdict = {}</div><div>&nbsp; &nbsp; tmpdict["CpuCores"] = 0</div><div>&nbsp; &nbsp; for cpu in c.Win32_Processor():&nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpdict["cpuid"] = cpu.ProcessorId.strip()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpdict["CpuType"] = cpu.Name</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpdict['systemName'] = cpu.SystemName</div><div>&nbsp; &nbsp; &nbsp; &nbsp; try:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpdict["CpuCores"] = cpu.NumberOfCores</div><div>&nbsp; &nbsp; &nbsp; &nbsp; except:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpdict["CpuCores"] += 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpdict["CpuClock"] = cpu.MaxClockSpeed&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpdict['DataWidth'] = cpu.DataWidth</div><div>&nbsp; &nbsp; print (tmpdict)</div><div>&nbsp; &nbsp; return&nbsp; tmpdict</div><div></div><div>#主板</div><div>def printMain_board():</div><div>&nbsp; &nbsp; boards = []</div><div>&nbsp; &nbsp; # print len(c.Win32_BaseBoard()):</div><div>&nbsp; &nbsp; for board_id in c.Win32_BaseBoard():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg = {}</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['UUID'] = board_id.qualifiers['UUID'][1:-1]&nbsp; &nbsp;#主板UUID,有的主板这部分信息取到为空值，ffffff-ffffff这样的</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['SerialNumber'] = board_id.SerialNumber&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #主板序列号</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Manufacturer'] = board_id.Manufacturer&nbsp; &nbsp; &nbsp; &nbsp;#主板生产品牌厂家</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Product'] = board_id.Product&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#主板型号</div><div>&nbsp; &nbsp; &nbsp; &nbsp; boards.append(tmpmsg)</div><div>&nbsp; &nbsp; print (boards)</div><div>&nbsp; &nbsp; return boards</div><div></div><div>#BIOS</div><div>def printBIOS():</div><div>&nbsp; &nbsp; bioss = []</div><div>&nbsp; &nbsp; for bios_id in c.Win32_BIOS():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg = {}</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['BiosCharacteristics'] = bios_id.BiosCharacteristics&nbsp; &nbsp;#BIOS特征码</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['version'] = bios_id.Version&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#BIOS版本</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Manufacturer'] = bios_id.Manufacturer.strip()&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#BIOS固件生产厂家</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['ReleaseDate'] = bios_id.ReleaseDate&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#BIOS释放日期</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['SMBIOSBIOSVersion'] = bios_id.SMBIOSBIOSVersion&nbsp; &nbsp; &nbsp; &nbsp;#系统管理规范版本</div><div>&nbsp; &nbsp; &nbsp; &nbsp; bioss.append(tmpmsg)</div><div>&nbsp; &nbsp; print (bioss)</div><div>&nbsp; &nbsp; return bioss</div><div></div><div>#硬盘</div><div>def printDisk():</div><div>&nbsp; &nbsp; disks = []</div><div>&nbsp; &nbsp; for disk in c.Win32_DiskDrive():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; # print disk.__dict__</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg = {}</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['SerialNumber'] = disk.SerialNumber.strip()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['DeviceID'] = disk.DeviceID</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Caption'] = disk.Caption</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Size'] = disk.Size</div><div>&nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['UUID'] = disk.qualifiers['UUID'][1:-1]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; disks.append(tmpmsg)</div><div>&nbsp; &nbsp; for d in disks:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print (d)</div><div>&nbsp; &nbsp; return disks</div><div></div><div>#电池信息，只有笔记本才会有电池选项</div><div>def printBattery():</div><div>&nbsp; &nbsp; isBatterys = False</div><div>&nbsp; &nbsp; for b in c.Win32_Battery():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; isBatterys = True</div><div>&nbsp; &nbsp; return isBatterys</div><div></div><div>#网卡mac地址：</div><div>def printMacAddress():</div><div>&nbsp; &nbsp; macs = []</div><div>&nbsp; &nbsp; for n in&nbsp; c.Win32_NetworkAdapter():</div><div>&nbsp; &nbsp; &nbsp; &nbsp; mactmp = n.MACAddress</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if mactmp and len(mactmp.strip()) &gt; 5:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpmsg = {}</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['MACAddress'] = n.MACAddress</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Name'] = n.Name</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['DeviceID'] = n.DeviceID</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['AdapterType'] = n.AdapterType</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmpmsg['Speed'] = n.Speed</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; macs.append(tmpmsg)</div><div>&nbsp; &nbsp; print (macs)</div><div>&nbsp; &nbsp; return macs</div><div></div><div></div><div></div><div>if __name__ == '__main__':</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; hd1=printCPU()</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; hd3=printMain_board()</div><div>&nbsp; &nbsp; #printBIOS()</div><div>&nbsp; &nbsp; #printDisk()</div><div>&nbsp; &nbsp; hd2=printMacAddress()</div><div>&nbsp; &nbsp; print(type(hd1))</div><div>&nbsp; &nbsp; print(type(hd2))</div><div>&nbsp; &nbsp; print(type(hd3))</div><div>&nbsp; &nbsp; print(hd1['cpuid'],hd1['systemName'],hd2[0]['MACAddress'],hd3[0]['UUID'],hd3[0]['SerialNumber'])</div><div>&nbsp; &nbsp; sum = hd1['cpuid'] + hd1['systemName'] + hd2[0]['MACAddress'] + hd3[0]['UUID']+ hd3[0]['SerialNumber']</div><div>&nbsp; &nbsp; shastr = sum.encode('gbk')</div><div>&nbsp; &nbsp; sha = hashlib.sha1(shastr).hexdigest()</div><div>&nbsp; &nbsp; if (sha == 'b696fcbb46e27a09458019942dd10856b0023fea'):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print('reg user')</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print('no reg user')</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; print(sha)</div><div>&nbsp; &nbsp; #print(sum)</div><div>&nbsp; &nbsp; #print(type(sum))</div><div>&nbsp; &nbsp; s1 = base64.encodestring(shastr)</div><div>&nbsp; &nbsp; print(s1)</div><div>&nbsp; &nbsp; #s2 = base64.decodestring(s1)</div><div>&nbsp; &nbsp; #print(s1,s2)</div><div>&nbsp; &nbsp; #print (printBattery())</div><div></div><img src ="http://www.cppblog.com/alantop/aggbug/216170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2019-01-06 12:51 <a href="http://www.cppblog.com/alantop/archive/2019/01/06/216170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>pycharm 2018.3 专业版注册码</title><link>http://www.cppblog.com/alantop/archive/2018/12/30/216155.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 30 Dec 2018 03:58:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/12/30/216155.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216155.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/12/30/216155.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216155.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216155.html</trackback:ping><description><![CDATA[<div>1.修改hosts<br /><div>0.0.0.0 account.jetbrains.com</div>2.软件中输入如下注册码（注册日期到2019.05）<br />K71U8DBPNE-eyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkNMIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSU1UiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifV0sImhhc2giOiI4OTA4Mjg5LzAiLCJncmFjZVBlcmlvZERheXMiOjAsImF1dG9Qcm9sb25nYXRlZCI6ZmFsc2UsImlzQXV0b1Byb2xvbmdhdGVkIjpmYWxzZX0=-Owt3/+LdCpedvF0eQ8635yYt0+ZLtCfIHOKzSrx5hBtbKGYRPFDrdgQAK6lJjexl2emLBcUq729K1+ukY9Js0nx1NH09l9Rw4c7k9wUksLl6RWx7Hcdcma1AHolfSp79NynSMZzQQLFohNyjD+dXfXM5GYd2OTHya0zYjTNMmAJuuRsapJMP9F1z7UTpMpLMxS/JaCWdyX6qIs+funJdPF7bjzYAQBvtbz+6SANBgN36gG1B2xHhccTn6WE8vagwwSNuM70egpahcTktoHxI7uS1JGN9gKAr6nbp+8DbFz3a2wd+XoF3nSJb/d2f/6zJR8yJF8AOyb30kwg3zf5cWw==-MIIEPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBMB4XDTE1MTEwMjA4MjE0OFoXDTE4MTEwMTA4MjE0OFowETEPMA0GA1UEAwwGcHJvZDN5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxcQkq+zdxlR2mmRYBPzGbUNdMN6OaXiXzxIWtMEkrJMO/5oUfQJbLLuMSMK0QHFmaI37WShyxZcfRCidwXjot4zmNBKnlyHodDij/78TmVqFl8nOeD5+07B8VEaIu7c3E1N+e1doC6wht4I4+IEmtsPAdoaj5WCQVQbrI8KeT8M9VcBIWX7fD0fhexfg3ZRt0xqwMcXGNp3DdJHiO0rCdU+Itv7EmtnSVq9jBG1usMSFvMowR25mju2JcPFp1+I4ZI+FqgR8gyG8oiNDyNEoAbsR3lOpI7grUYSvkB/xVy/VoklPCK2h0f0GJxFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQC9WZuYgQedSuOc5TOUSrRigMw4/+wuC5EtZBfvdl4HT/8vzMW/oUlIP4YCvA0XKyBaCJ2iX+ZCDKoPfiYXiaSiH+HxAPV6J79vvouxKrWg2XV6ShFtPLP+0gPdGq3x9R3+kJbmAm8w+FOdlWqAfJrLvpzMGNeDU14YGXiZ9bVzmIQbwrBA+c/F4tlK/DV07dsNExihqFoibnqDiVNTGombaU2dDup2gwKdL81ua8EIcGNExHe82kjF4zwfadHk3bQVvbfdAwxcDy4xBjs3L4raPLU3yenSzr/OEur1+jfOxnQSmEcMXKXgrAQ9U55gwjcOFKrgOxEdek/Sk1VfOjvS+nuM4eyEruFMfaZHzoQiuw4IqgGc45ohFH0UUyjYcuFxxDSU9lMCv8qdHKm+wnPRb0l9l5vXsCBDuhAGYD6ss+Ga+aDY6f/qXZuUCEUOH3QUNbbCUlviSz6+GiRnt1kA9N2Qachl+2yBfaqUqr8h7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG++2+wNWP+HtBhVxMRNTdVhSm38AknZlD+PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK+pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog==</div><div></div><div></div><img src ="http://www.cppblog.com/alantop/aggbug/216155.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-12-30 11:58 <a href="http://www.cppblog.com/alantop/archive/2018/12/30/216155.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>解决nohup 输出不带python print的输出问题</title><link>http://www.cppblog.com/alantop/archive/2018/12/19/216127.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Wed, 19 Dec 2018 02:40:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/12/19/216127.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216127.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/12/19/216127.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216127.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216127.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/alantop/archive/2018/12/19/216127.html'>阅读全文</a><img src ="http://www.cppblog.com/alantop/aggbug/216127.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-12-19 10:40 <a href="http://www.cppblog.com/alantop/archive/2018/12/19/216127.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>gvim 配置python运行环境</title><link>http://www.cppblog.com/alantop/archive/2018/12/08/216111.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sat, 08 Dec 2018 07:04:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/12/08/216111.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216111.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/12/08/216111.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216111.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216111.html</trackback:ping><description><![CDATA[ "配置python解释器
    autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"  
    autocmd BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m  
    autocmd BufRead *.py nmap <F5> :!python %<CR>  
    autocmd BufRead *.py nmap <F6> :make<CR>  
    autocmd BufRead *.py copen "如果是py文件，则同时打开编译信息窗口  

将上面拷贝到 C:\Program Files (x86)\Vim\_vimrc 的最后一行<img src ="http://www.cppblog.com/alantop/aggbug/216111.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-12-08 15:04 <a href="http://www.cppblog.com/alantop/archive/2018/12/08/216111.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 切换到指定目录执行程序</title><link>http://www.cppblog.com/alantop/archive/2018/12/02/216105.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 02 Dec 2018 13:12:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/12/02/216105.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216105.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/12/02/216105.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216105.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216105.html</trackback:ping><description><![CDATA[import os<br /><br />os.chdir('d:\\alantop_dir')<br />os.system('python alantop_dir_demo.py')<img src ="http://www.cppblog.com/alantop/aggbug/216105.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-12-02 21:12 <a href="http://www.cppblog.com/alantop/archive/2018/12/02/216105.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3使用chrome浏览器打开指定网页</title><link>http://www.cppblog.com/alantop/archive/2018/11/25/216079.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 25 Nov 2018 10:20:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/11/25/216079.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216079.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/11/25/216079.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216079.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216079.html</trackback:ping><description><![CDATA[<div>import webbrowser&nbsp;</div><div></div><div>chromePath = r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'</div><div>webbrowser.register('chrome', None, webbrowser.BackgroundBrowser(chromePath))</div><div>webbrowser.get('chrome').open('https://www.baidu.com',new=1,autoraise=True)</div><div></div><img src ="http://www.cppblog.com/alantop/aggbug/216079.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-11-25 18:20 <a href="http://www.cppblog.com/alantop/archive/2018/11/25/216079.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>notepad ++ 配置 python 和运行目录</title><link>http://www.cppblog.com/alantop/archive/2018/11/24/216077.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sat, 24 Nov 2018 04:18:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/11/24/216077.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/216077.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/11/24/216077.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/216077.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/216077.html</trackback:ping><description><![CDATA[<span style="color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; background-color: #ffffff;">cmd&nbsp;/k&nbsp;cd&nbsp;/d&nbsp;"$(CURRENT_DIRECTORY)"&nbsp;&amp;&nbsp;&nbsp;python&nbsp;"$(FULL_CURRENT_PATH)"&nbsp;&amp;&nbsp;ECHO.&nbsp;&amp;&nbsp;PAUSE&nbsp;&amp;&nbsp;EXIT</span><img src ="http://www.cppblog.com/alantop/aggbug/216077.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-11-24 12:18 <a href="http://www.cppblog.com/alantop/archive/2018/11/24/216077.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>升级pip失败解决方案</title><link>http://www.cppblog.com/alantop/archive/2018/08/12/215838.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 12 Aug 2018 01:55:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/08/12/215838.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215838.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/08/12/215838.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215838.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215838.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: anaconda 3升级pip失败解决方案&nbsp;&nbsp;<a href='http://www.cppblog.com/alantop/archive/2018/08/12/215838.html'>阅读全文</a><img src ="http://www.cppblog.com/alantop/aggbug/215838.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-08-12 09:55 <a href="http://www.cppblog.com/alantop/archive/2018/08/12/215838.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 从文件中搜索包含字符串的行</title><link>http://www.cppblog.com/alantop/archive/2018/05/23/215675.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Wed, 23 May 2018 07:11:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/05/23/215675.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215675.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/05/23/215675.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215675.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215675.html</trackback:ping><description><![CDATA[<div></div><div>import codecs</div><div>FileName = r'c:\ls\1'</div><div>#KeyStr = input("the key string: ")</div><div>KeyStr = '&lt;dd class="info"&gt;&lt;span&gt;执业证号：'</div><div>FoundFlag = False<br />#用utf-8格式打开文件</div><div></div><div>FileObj = codecs.open(FileName, 'r', 'utf-8')</div><div></div><div>LineTemp = FileObj.readline()</div><div>while LineTemp:</div><div>&nbsp; &nbsp;# print(LineTemp)</div><div>&nbsp; &nbsp;# print(KeyStr)</div><div></div><div>&nbsp; &nbsp;# zc = LineTemp.find(KeyStr)</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; if LineTemp.find(KeyStr) &gt; 0:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; FoundFlag = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print("*************************") &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print("the line is: " + LineTemp, end='')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print("*************************")</div><div>&nbsp; &nbsp; &nbsp; &nbsp; LineTemp = FileObj.readline()</div><div>&nbsp;# &nbsp; &nbsp; &nbsp; break</div><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; LineTemp = FileObj.readline()</div><div>FileObj.close()</div><div></div><div>if FoundFlag == False:</div><div>&nbsp; &nbsp; print("Not found the string!")</div><div></div><img src ="http://www.cppblog.com/alantop/aggbug/215675.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-05-23 15:11 <a href="http://www.cppblog.com/alantop/archive/2018/05/23/215675.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 从后台激活到前台 截图</title><link>http://www.cppblog.com/alantop/archive/2018/05/19/215657.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sat, 19 May 2018 05:12:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/05/19/215657.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215657.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/05/19/215657.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215657.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215657.html</trackback:ping><description><![CDATA[<div>如果是最小化激活到前台，不是下面的代码，下面代码仅是从后台激活到前台<br />&nbsp; &nbsp; wrHd=win32gui.FindWindow(u'#32770',u'TeamViewer')</div><div>&nbsp; &nbsp; print(win32gui.SetForegroundWindow(wrHd))</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span></div><div>&nbsp; &nbsp; from PIL import ImageGrab &nbsp;</div><div>&nbsp; &nbsp; bbox = (0, 0, 1160, 500) &nbsp;</div><div>&nbsp; &nbsp; im = ImageGrab.grab(bbox) &nbsp;</div><div>&nbsp; &nbsp; im.save('d:\\demo.png') &nbsp;</div><img src ="http://www.cppblog.com/alantop/aggbug/215657.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-05-19 13:12 <a href="http://www.cppblog.com/alantop/archive/2018/05/19/215657.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 检测进程是否存在 </title><link>http://www.cppblog.com/alantop/archive/2018/05/19/215656.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sat, 19 May 2018 04:06:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/05/19/215656.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215656.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/05/19/215656.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215656.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215656.html</trackback:ping><description><![CDATA[pip install pywin32<br /><br /><div>import win32com.client &nbsp;</div><div>&nbsp;&nbsp;</div><div>def check_exsit(process_name): &nbsp;</div><div>&nbsp; &nbsp; WMI = win32com.client.GetObject('winmgmts:') &nbsp;</div><div>&nbsp; &nbsp; processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name="%s"' % process_name) &nbsp;</div><div>&nbsp; &nbsp; if len(processCodeCov) &gt; 0: &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print ('%s is exists' % process_name) &nbsp;</div><div>&nbsp; &nbsp; else: &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print ('%s is not exists' % process_name) &nbsp;</div><div>&nbsp;&nbsp;</div><div>if __name__ == '__main__': &nbsp;</div><div>&nbsp; &nbsp; check_exsit('360se.exe') &nbsp;</div><img src ="http://www.cppblog.com/alantop/aggbug/215656.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-05-19 12:06 <a href="http://www.cppblog.com/alantop/archive/2018/05/19/215656.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>notepad++ 配置python</title><link>http://www.cppblog.com/alantop/archive/2018/05/18/215655.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Fri, 18 May 2018 12:41:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/05/18/215655.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215655.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/05/18/215655.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215655.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215655.html</trackback:ping><description><![CDATA[点击&#8220;运行&#8221;，键入<br /><span style="font-family: Consolas, &quot;Courier New&quot;, Courier, mono, serif; font-size: 12px;">cmd&nbsp;/k&nbsp;python&nbsp;"$(FULL_CURRENT_PATH)"&nbsp;&amp;&nbsp;ECHO.&nbsp;&amp;&nbsp;PAUSE&nbsp;&amp;&nbsp;EXIT &nbsp;<br /><br />设置名称，设置快捷方式 ctrl+shift+F5<br /><br /></span><img src ="http://www.cppblog.com/alantop/aggbug/215655.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-05-18 20:41 <a href="http://www.cppblog.com/alantop/archive/2018/05/18/215655.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3如何打开关闭CapsLock</title><link>http://www.cppblog.com/alantop/archive/2018/05/16/215643.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Wed, 16 May 2018 10:17:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/05/16/215643.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215643.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/05/16/215643.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215643.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215643.html</trackback:ping><description><![CDATA[<div style="line-height: 19px; background-color: #1e1e1e; font-family: Consolas, 'Courier New', monospace; white-space: pre; color: #d4d4d4; font-size: 14px; font-weight: normal">
<div><span style="color: #c586c0"><strong><font color="#333333" face="微软雅黑">pip install pywin32</font></strong><br /><br />import</span><span style="color: #d4d4d4"> win32api</span></div>
<div><span style="color: #c586c0">import</span><span style="color: #d4d4d4"> win32con</span></div><br />
<div><span style="color: #608b4e">#win32api.keybd_event(20,0,win32con.WM_KEYDOWN,0)</span></div>
<div><span style="color: #608b4e">#win32api.keybd_event(20,0,win32con.WM_KEYUP,0)</span></div>
<div><span style="color: #608b4e">#win32api.keybd_event(17,0,win32con.KEYEVENTF_KEYUP,0)</span></div>
<div><span style="color: #d4d4d4">win32api.keybd_event(</span><span style="color: #b5cea8">20</span><span style="color: #d4d4d4">,</span><span style="color: #b5cea8">0</span><span style="color: #d4d4d4">,</span><span style="color: #b5cea8">0</span><span style="color: #d4d4d4">,</span><span style="color: #b5cea8">0</span><span style="color: #d4d4d4">)</span></div>
<div><span style="color: #d4d4d4">win32api.keybd_event(</span><span style="color: #b5cea8">20</span><span style="color: #d4d4d4">,</span><span style="color: #b5cea8">0</span><span style="color: #d4d4d4">,win32con.KEYEVENTF_KEYUP,</span><span style="color: #b5cea8">0</span><span style="color: #d4d4d4">)</span></div></div><img src ="http://www.cppblog.com/alantop/aggbug/215643.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-05-16 18:17 <a href="http://www.cppblog.com/alantop/archive/2018/05/16/215643.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何获取要的收盘价 定投收益最后 计算方法</title><link>http://www.cppblog.com/alantop/archive/2018/02/27/215536.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 27 Feb 2018 08:42:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/27/215536.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215536.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/27/215536.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215536.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215536.html</trackback:ping><description><![CDATA[<div>import numpy as np</div><div>import pandas as pd</div><div>data_csv = pd.read_table('c:\\399300_3.csv',sep=',')</div><div>print("data_csv:")</div><div>print(data_csv)</div><div></div><div>第一个1是索引值 第二个 是要的收盘价</div><div>data_csv.ix[1][1]&nbsp;<br /><br /><div>import numpy as np</div><div>import pandas as pd</div><div>data_csv = pd.read_table('c:\\399300_3.csv',sep=',')</div><div>print("data_csv:")</div><div>print(data_csv)</div><div></div><div>test = 10000 / data_csv.close&nbsp;</div><div>test.sum()<br /><br /><div><div>import tushare as ts</div><div>df = ts.get_hist_data('000625', ktype='M')</div><div>#直接保存</div><div>df.to_csv('c:/000625.csv')</div><div></div><div>#选择保存</div><div>df.to_csv('c:/000625_close.csv',columns=['close'])</div></div></div></div><img src ="http://www.cppblog.com/alantop/aggbug/215536.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-27 16:42 <a href="http://www.cppblog.com/alantop/archive/2018/02/27/215536.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>获取股票月线</title><link>http://www.cppblog.com/alantop/archive/2018/02/27/215535.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 27 Feb 2018 08:06:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/27/215535.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215535.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/27/215535.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215535.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215535.html</trackback:ping><description><![CDATA[<div>import tushare as ts</div><div></div><div>a = ts.get_k_data('150228', ktype='60')<br />获取月线<br /><br />获取代码表<br /><div>a = ts.get_stock_basics()<br /><br />读取沪深300数据保存在excel中import tushare as ts</div><div></div><div>df = ts.get_hist_data('399300', ktype='M')</div><div>#直接保存</div><div>df.to_csv('c:/399300.csv')</div><div>#选择保存</div><div>df.to_csv('c:/399300_2.csv',columns=['open','close'])<br /><br /><div></div></div></div><img src ="http://www.cppblog.com/alantop/aggbug/215535.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-27 16:06 <a href="http://www.cppblog.com/alantop/archive/2018/02/27/215535.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 matplotlib绘图</title><link>http://www.cppblog.com/alantop/archive/2018/02/27/215533.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 27 Feb 2018 07:01:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/27/215533.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215533.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/27/215533.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215533.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215533.html</trackback:ping><description><![CDATA[<div>import numpy as np</div><div>import matplotlib as mpl</div><div>import matplotlib.pyplot as plt</div><div>&nbsp;</div><div># 通过rcParams设置全局横纵轴字体大小</div><div>mpl.rcParams['xtick.labelsize'] = 24</div><div>mpl.rcParams['ytick.labelsize'] = 24</div><div>&nbsp;</div><div>np.random.seed(42)</div><div>&nbsp;</div><div># x轴的采样点</div><div>x = np.linspace(0, 5, 100)</div><div>&nbsp;</div><div># 通过下面曲线加上噪声生成数据，所以拟合模型就用y了&#8230;&#8230;</div><div>y = 2*np.sin(x) + 0.3*x**2</div><div>y_data = y + np.random.normal(scale=0.3, size=100)</div><div>&nbsp;</div><div># figure()指定图表名称</div><div>plt.figure('data')</div><div>&nbsp;</div><div># '.'标明画散点图，每个散点的形状是个圆</div><div>plt.plot(x, y_data, '.')</div><div>&nbsp;</div><div># 画模型的图，plot函数默认画连线图</div><div>plt.figure('model')</div><div>plt.plot(x, y)</div><div>&nbsp;</div><div># 两个图画一起</div><div>plt.figure('data &amp; model')</div><div>&nbsp;</div><div># 通过'k'指定线的颜色，lw指定线的宽度</div><div># 第三个参数除了颜色也可以指定线形，比如'r--'表示红色虚线</div><div># 更多属性可以参考官网：http://matplotlib.org/api/pyplot_api.html</div><div>plt.plot(x, y, 'k', lw=3)</div><div>&nbsp;</div><div># scatter可以更容易地生成散点图</div><div>plt.scatter(x, y_data)</div><div>&nbsp;</div><div># 将当前figure的图保存到文件result.png</div><div>plt.savefig('result.png')</div><div>&nbsp;</div><div># 一定要加上这句才能让画好的图显示在屏幕上</div><div>plt.show()</div><img src ="http://www.cppblog.com/alantop/aggbug/215533.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-27 15:01 <a href="http://www.cppblog.com/alantop/archive/2018/02/27/215533.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 numpy</title><link>http://www.cppblog.com/alantop/archive/2018/02/27/215532.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 27 Feb 2018 06:52:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/27/215532.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215532.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/27/215532.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215532.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215532.html</trackback:ping><description><![CDATA[<div>import numpy as np</div><div></div><div>a = np.array([1,2,3])</div><div>b = a*2<br /><br /><div>import numpy as np</div><div>a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])</div><div>b = a*2</div></div><div></div><img src ="http://www.cppblog.com/alantop/aggbug/215532.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-27 14:52 <a href="http://www.cppblog.com/alantop/archive/2018/02/27/215532.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python pandas 读取excel</title><link>http://www.cppblog.com/alantop/archive/2018/02/27/215531.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 27 Feb 2018 06:42:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/27/215531.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215531.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/27/215531.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215531.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215531.html</trackback:ping><description><![CDATA[<div>注意csv文件必须是utf-8，如果不是，先转换文件格式。（有前面utf-8）<br />import numpy as np</div><div>import pandas as pd</div><div></div><div>data_csv = pd.read_table('c:\\2.csv',sep=',')</div><div>print("data_csv:")</div><div>print(data_csv)<br /><br /><br />传统读取csv文件方法<br /><div></div><div>import csv</div><div>csvFile = open("c:\\1.csv","r")</div><div>reader = csv.reader(csvFile) &nbsp;# 返回的是迭代类型</div><div>data = []</div><div>for item in reader:</div><div>&nbsp; &nbsp; print(item)</div><div>&nbsp; &nbsp; data.append(item)</div><div></div><div>print(data,"3")</div><div>print(data[0],"2") &nbsp;</div><div>print(data[0][0],"1")</div><div></div><div>csvFile.close()</div><div></div></div><img src ="http://www.cppblog.com/alantop/aggbug/215531.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-27 14:42 <a href="http://www.cppblog.com/alantop/archive/2018/02/27/215531.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python 操作其他进程控件</title><link>http://www.cppblog.com/alantop/archive/2018/02/26/215526.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Mon, 26 Feb 2018 04:35:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/26/215526.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215526.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/26/215526.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215526.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215526.html</trackback:ping><description><![CDATA[<h1><br /></h1><div style="clear: both; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></div><div style="clear: both; margin-top: 26px; color: #444444; line-height: 1.8; font-family: Tahoma, Arial, Helvetica, sans-serif; background-color: #ffffff;"><div id="cnblogs_post_body" style="margin-bottom: 20px; word-break: break-word;"><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">1.如何利用句柄操作windows窗体</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">首先，获得窗体的句柄&nbsp; win32api.FindWindows()</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">第二，获得窗体中控件的id号，spy++</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">第三，根据控件的ID获得控件的句柄（hwnd)&nbsp; GetDlgItem(hwnd,loginID)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">最后，<span style="color: #333300;">利用</span><span style="color: #333300;">控件句柄进行</span>操作</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">python可以通过win32api轻松获取控件的属性值</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">通过标签找到主窗口句柄，然后通过主句柄获取下属控件句柄</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">#-*- coding: utf-8 -*- &nbsp;##设置编码方式</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">import win32api,win32gui,win32con</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">label = 'tt' #此处假设主窗口名为tt</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">hld = win32gui.FindWindow(None, label)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">if hld &gt; 0:</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; dlg = win32api.FindWindowEx(hld, None, 'Edit', None)#获取hld下第一个为edit控件的句柄</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; buffer = '0' *50</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; len = win32gui.SendMessage(dlg, win32con.WM_GETTEXTLENGTH)+1 #获取edit控件文本长度</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; win32gui.SendMessage(dlg, win32con.WM_GETTEXT, len, buffer) #读取文本</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; print buffer[:len-1]</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; #虚拟鼠标点击按钮(或者回车)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; btnhld =&nbsp;win32api.FindWindowEx(hld, None,'Button', None)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; # win32gui.PostMessage(btnhld, win32con.WM_KEYDOWN, win32con.VK_RETURN, 0)#火狐有效</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp;&nbsp;# win32gui.PostMessage(btnhld, win32con.WM_KEYUP, win32con.VK_RETURN, 0)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; win32gui.PostMessage(btnhld, win32con.WM_LBUTTONDOWN, win32con.MK_LBUTTON, 0)#谷歌有效，火狐无效</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; win32gui.PostMessage(btnhld, win32con.WM_LBUTTONUP, win32con.MK_LBUTTON, 0)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; #获取显示器屏幕大小</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; width = win32api.GetSystemMetrics(win32con.SM_CXSCREEN)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;">&nbsp; &nbsp; height = win32api.GetSystemMetrics(win32con.SM_CYSCREEN)</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none;"><br />#点击窗口button<br />w=win32ui.FindWindow(clsname,windowtitle)<br />b=w.GetDlgItem(窗口id)<br />b.postMessage(win32con.BM_CLICK)<br /><br /><br />#关闭窗体<br />import win32ui<br />import win32con<br />wnd=win32ui.FindWindow(classname,None)<br />wnd.SendMessage(win32con.WM_CLOSE)&nbsp; 成功！<br /><br />import win32ui<br />w=win32ui.FindWindow(classname,窗体title)<br />print w.GetDlgItemText(0xFFFF)&nbsp; # 获得弹窗里的消息文字<br /><br />最小化窗体<br />w=win32gui.FindWindow()<br />win32gui.CloseWindow(w)</p></div></div><img src ="http://www.cppblog.com/alantop/aggbug/215526.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-26 12:35 <a href="http://www.cppblog.com/alantop/archive/2018/02/26/215526.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python 在金融分析用的应用</title><link>http://www.cppblog.com/alantop/archive/2018/02/24/215522.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sat, 24 Feb 2018 06:14:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/24/215522.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215522.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/24/215522.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215522.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215522.html</trackback:ping><description><![CDATA[<div>python3 获取基金及历史净值数据</div><div>http://blog.csdn.net/yuzhucu/article/details/55261024</div><div></div><div>定投和Matplotlib作图</div><div>http://blog.csdn.net/sero_qu/article/details/53267473</div><div></div><img src ="http://www.cppblog.com/alantop/aggbug/215522.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-24 14:14 <a href="http://www.cppblog.com/alantop/archive/2018/02/24/215522.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Python2个自动化键盘鼠标的库  PyAutoGUI和Pywinauto</title><link>http://www.cppblog.com/alantop/archive/2018/02/11/215514.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sun, 11 Feb 2018 08:01:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/11/215514.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215514.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/11/215514.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215514.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215514.html</trackback:ping><description><![CDATA[<h1>Python2个自动化键盘鼠标的库 &nbsp;PyAutoGUI和Pywinauto</h1><img src ="http://www.cppblog.com/alantop/aggbug/215514.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-11 16:01 <a href="http://www.cppblog.com/alantop/archive/2018/02/11/215514.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python3 tcpclient发送16进制</title><link>http://www.cppblog.com/alantop/archive/2018/02/06/215509.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 06 Feb 2018 12:17:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/06/215509.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215509.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/06/215509.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215509.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215509.html</trackback:ping><description><![CDATA[<pre style="background-color: #ffffff; font-family: 宋体; font-size: 9pt;"><span style="color:#808080;font-style:italic;">#!/usr/bin/env python3<br /></span><span style="color:#808080;font-style:italic;">#-*- coding:utf-8 -*-<br /></span><span style="color:#808080;font-style:italic;"><br /></span><span style="color:#000080;font-weight:bold;">from </span>socket <span style="color:#000080;font-weight:bold;">import </span>*<br /><span style="color:#000080;font-weight:bold;">import </span>struct<br /><span style="color:#000080;font-weight:bold;">import </span>time<br /><br />HOST =<span style="color:#008080;font-weight:bold;">'192.168.1.74'<br /></span><span style="color:#008080;font-weight:bold;"><br /></span>PORT = <span style="color:#0000ff;">60000<br /></span><span style="color:#0000ff;"><br /></span>BUFFSIZE=<span style="color:#0000ff;">2048<br /></span><span style="color:#0000ff;"><br /></span>ADDR = (HOST,PORT)<br /><br />tctimeClient = socket(AF_INET,SOCK_STREAM)<br /><br />tctimeClient.connect(ADDR)<br /><br />a=[<span style="color:#0000ff;">0x55</span>, <span style="color:#0000ff;">0xaa</span>] <br />data=struct.pack(<span style="color:#008080;font-weight:bold;">"%dB"</span>%(<span style="color:#000080;">len</span>(a)),*a)<br /><br /><span style="color:#000080;font-weight:bold;">while True</span>:<br />    <span style="color:#808080;font-style:italic;">#data = input("&gt;")<br /></span><span style="color:#808080;font-style:italic;">    <br /></span><span style="color:#808080;font-style:italic;">    #if not data:<br /></span><span style="color:#808080;font-style:italic;">        #break<br /></span><span style="color:#808080;font-style:italic;">    #tctimeClient.send(data.encode())<br /></span> tctimeClient.send(data)<br />    <span style="color:#808080;font-style:italic;">#time.sleep(10)<br /></span> data = tctimeClient.recv(BUFFSIZE).decode()<br />    <span style="color:#000080;font-weight:bold;">if not </span>data:<br />        <span style="color:#000080;font-weight:bold;">break<br /></span> <span style="color:#000080;">print</span>(data)<br />tctimeClient.close()<br /></pre><img src ="http://www.cppblog.com/alantop/aggbug/215509.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-06 20:17 <a href="http://www.cppblog.com/alantop/archive/2018/02/06/215509.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>emeditor 配置python环境</title><link>http://www.cppblog.com/alantop/archive/2018/02/05/215504.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Mon, 05 Feb 2018 08:17:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/05/215504.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215504.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/05/215504.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215504.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215504.html</trackback:ping><description><![CDATA[菜单栏 选择 工具 -&gt; 外部工具<br /><br />标题:python<br />命令:d:\python34\python.exe<br />参数A: $(Path)<br />初始目录：$(Dir)<br /><br />勾中： 在输出栏中显示<br /><br />编码：UTF-8<br /><img src ="http://www.cppblog.com/alantop/aggbug/215504.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-05 16:17 <a href="http://www.cppblog.com/alantop/archive/2018/02/05/215504.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python 访问 oracle 和 python gui教程</title><link>http://www.cppblog.com/alantop/archive/2018/02/05/215503.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Mon, 05 Feb 2018 07:40:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/05/215503.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215503.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/05/215503.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215503.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215503.html</trackback:ping><description><![CDATA[<span style="font-family: 宋体, &quot;Lucida Grande&quot;, &quot;Lucida Sans&quot;, Verdana, Arial, sans-serif; font-size: 13px; background-color: #ffffff;">#coding:utf-8&nbsp;</span><br style="font-family: 宋体, &quot;Lucida Grande&quot;, &quot;Lucida Sans&quot;, Verdana, Arial, sans-serif; font-size: 13px; background-color: #ffffff;" /><span style="font-family: 宋体, &quot;Lucida Grande&quot;, &quot;Lucida Sans&quot;, Verdana, Arial, sans-serif; font-size: 13px; background-color: #ffffff;">import win32ui,win32con&nbsp;</span><br style="font-family: 宋体, &quot;Lucida Grande&quot;, &quot;Lucida Sans&quot;, Verdana, Arial, sans-serif; font-size: 13px; background-color: #ffffff;" /><span style="font-family: 宋体, &quot;Lucida Grande&quot;, &quot;Lucida Sans&quot;, Verdana, Arial, sans-serif; font-size: 13px; background-color: #ffffff;">hWnd=win32ui.FindWindow('Notepad',None)&nbsp;</span><br style="font-family: 宋体, &quot;Lucida Grande&quot;, &quot;Lucida Sans&quot;, Verdana, Arial, sans-serif; font-size: 13px; background-color: #ffffff;" /><span style="background-color: #ffffff;"><font face="宋体, Lucida Grande, Lucida Sans, Verdana, Arial, sans-serif"><span style="font-size: 13px;">hWnd.SendMessage(win32con.WM_SETTEXT,'hello world') &nbsp;</span></font><br /><br /></span><div></div><div><span style="font-size: 13px;">http://www.cnblogs.com/shemingli/p/6344766.html python gui教程</span></div><div></div><div><span style="font-size: 13px;">https://www.cnblogs.com/wHw-24/archive/2017/10/21/7706641.html python 访问 oracle</span></div><br /><img src ="http://www.cppblog.com/alantop/aggbug/215503.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-05 15:40 <a href="http://www.cppblog.com/alantop/archive/2018/02/05/215503.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Pycharm 调试控制台乱码的解决方案</title><link>http://www.cppblog.com/alantop/archive/2018/02/03/215498.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Sat, 03 Feb 2018 04:08:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/02/03/215498.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215498.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/02/03/215498.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215498.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215498.html</trackback:ping><description><![CDATA[软件环境：<br />win7 32位<br />pycharm 2017.3.3<br />setting 上 搜索 File Encodings 字段，修改Global Encoding为system default:GBK,修改Project Encoding为System Default:GBK.<img src ="http://www.cppblog.com/alantop/aggbug/215498.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-02-03 12:08 <a href="http://www.cppblog.com/alantop/archive/2018/02/03/215498.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python 下载win32api模块</title><link>http://www.cppblog.com/alantop/archive/2018/01/31/215494.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Wed, 31 Jan 2018 09:44:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/01/31/215494.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215494.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/01/31/215494.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215494.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215494.html</trackback:ping><description><![CDATA[<span style="color: #454545; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun; font-size: 16px; background-color: #ffffff;">pip install pypiwin32</span><img src ="http://www.cppblog.com/alantop/aggbug/215494.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-01-31 17:44 <a href="http://www.cppblog.com/alantop/archive/2018/01/31/215494.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python 模拟鼠标 键盘操作</title><link>http://www.cppblog.com/alantop/archive/2018/01/31/215493.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Wed, 31 Jan 2018 08:25:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/01/31/215493.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215493.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/01/31/215493.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215493.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215493.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/alantop/archive/2018/01/31/215493.html'>阅读全文</a><img src ="http://www.cppblog.com/alantop/aggbug/215493.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-01-31 16:25 <a href="http://www.cppblog.com/alantop/archive/2018/01/31/215493.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>python ntp客户端校时</title><link>http://www.cppblog.com/alantop/archive/2018/01/31/215492.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Wed, 31 Jan 2018 08:08:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/01/31/215492.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215492.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/01/31/215492.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215492.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215492.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: python ntp客户端校时&nbsp;&nbsp;<a href='http://www.cppblog.com/alantop/archive/2018/01/31/215492.html'>阅读全文</a><img src ="http://www.cppblog.com/alantop/aggbug/215492.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-01-31 16:08 <a href="http://www.cppblog.com/alantop/archive/2018/01/31/215492.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>