上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 67 下一页
摘要: import urllib.request import urllib.parse import string def get_method_params(): url = "http://www.baidu.com/s?wd=" #拼接字符串(汉字) #python可以接受的数据 #https://www.baidu.com/s?wd=%E7%BE%8E%E... 阅读全文
posted @ 2019-03-24 23:02 hank-li 阅读(138) 评论(0) 推荐(0)
摘要: import urllib.request def load_data(): url = "http://www.baidu.com/" #get的请求 #http请求 #response:http相应的对象 response = urllib.request.urlopen(url) print( 阅读全文
posted @ 2019-03-24 22:52 hank-li 阅读(140) 评论(0) 推荐(0)
摘要: sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My* edit /etc/h 阅读全文
posted @ 2019-03-24 13:16 hank-li 阅读(160) 评论(0) 推荐(0)
摘要: 但是报错 ImportError: cannot import name 'Process' 查询后是由于.py文件名multiprocessing冲突,于是修改文件名,并删除之前编译所生成的multiprocess.pyc文件,运行成功。 Parent process 16572.Process 阅读全文
posted @ 2019-03-23 12:14 hank-li 阅读(1458) 评论(0) 推荐(1)
摘要: 解决方案: 阅读全文
posted @ 2019-03-22 18:38 hank-li 阅读(3017) 评论(0) 推荐(0)
摘要: I have hundreds of XML files that I need to extract two values from and ouput in an Excel or CSV file. This is the code I currently have: #grabs idRoo 阅读全文
posted @ 2019-03-22 18:37 hank-li 阅读(3208) 评论(0) 推荐(0)
摘要: 本文转至http://www.cnblogs.com/kaituorensheng/p/4465768.html,在其基础上进行了一些小小改动。 在利用Python进行系统管理的时候,特别是同时操作多个文件目录,或者远程控制多台主机,并行操作可以节约大量的时间。当被操作对象数目不大时,可以直接利用m 阅读全文
posted @ 2019-03-22 07:38 hank-li 阅读(732) 评论(0) 推荐(0)
摘要: from multiprocessing import Pool pool=Pool() pool.map(getInfo(url)) 阅读全文
posted @ 2019-03-22 06:26 hank-li 阅读(240) 评论(0) 推荐(0)
摘要: 在Python3中使用以下代码报错: 错误代码如下: 方法: 在语句前加上以下代码即可不会被报错: 阅读全文
posted @ 2019-03-14 18:06 hank-li 阅读(654) 评论(0) 推荐(0)
摘要: 检查QQ是否在线(api感觉不准) 阅读全文
posted @ 2019-03-14 10:51 hank-li 阅读(1059) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 67 下一页