会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
龟窝
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
8
下一页
2016年7月11日
关于python urlopen 一个类似radio流的timeout方法
摘要: 终极解决方法来啦!看代码感受: 5s以后会把read()方法给掐了 另见 http://stackoverflow.com/questions/2281850/timeout-function-if-it-takes-too-long-to-finish
阅读全文
posted @ 2016-07-11 09:52 龟窝
阅读(372)
评论(0)
推荐(0)
2016年6月19日
Python nltk English Detection
摘要: http://blog.alejandronolla.com/2013/05/15/detecting-text-language-with-python-and-nltk/ >>> from nltk import wordpunct_tokenize >>> wordpunct_tokenize
阅读全文
posted @ 2016-06-19 12:27 龟窝
阅读(259)
评论(0)
推荐(0)
2016年4月8日
Python依赖打包发布详细
摘要: http://www.cnblogs.com/mywolrd/p/4756005.html 将Python脚本打包成可执行文件 Python是一个脚本语言,被解释器解释执行。它的发布方式: .py文件:对于开源项目或者源码没那么重要的,直接提供源码,需要使用者自行安装Python并且安装依赖的各种库
阅读全文
posted @ 2016-04-08 21:57 龟窝
阅读(28418)
评论(0)
推荐(1)
2016年4月7日
python 怎么和命令行交互
摘要: http://www.cyberciti.biz/faq/python-run-external-command-and-get-output/ http://stackoverflow.com/questions/1124884/interact-with-a-windows-console-ap
阅读全文
posted @ 2016-04-07 01:30 龟窝
阅读(384)
评论(0)
推荐(0)
2016年3月27日
Python中多维数组flatten的技巧
摘要: res00是一张rgb图 [x for sub1 in res00 for sub2 in sub1 for x in sub2] 列出所有像素值
阅读全文
posted @ 2016-03-27 21:04 龟窝
阅读(795)
评论(0)
推荐(0)
Python中的url编码问题
摘要: >>> import urllib >>> a = "PythonTab中文网" >>> a 'PythonTab\xe4\xb8\xad\xe6\x96\x87\xe7\xbd\x91' >>> urllib.quote(a) 'PythonTab%E4%B8%AD%E6%96%87%E7%BD%
阅读全文
posted @ 2016-03-27 02:33 龟窝
阅读(309)
评论(0)
推荐(0)
2016年3月24日
python数据持久存储:pickle模块的基本使用
摘要: 参考 http://www.cnblogs.com/pzxbc/archive/2012/03/18/2404715.html python的pickle模块实现了基本的数据序列和反序列化。通过pickle模块的序列化操作我们能够将程序中运行的对象信息保存到文件中去,永久存储;通过pickle模块的
阅读全文
posted @ 2016-03-24 02:01 龟窝
阅读(178)
评论(0)
推荐(0)
2016年3月23日
Python控制台输出不换行(进度条等)
摘要: sys.stdout.write('\r'+str) sys.stdout.flush() time.sleep(1)
阅读全文
posted @ 2016-03-23 18:11 龟窝
阅读(1079)
评论(0)
推荐(0)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 7: ordinal not in range(128) [duplicate]
摘要: Python在往文件里写东西的时候,如果ascii码报错 参考 http://stackoverflow.com/questions/19833440/unicodeencodeerror-ascii-codec-cant-encode-character-u-xe9-in-position-7 Y
阅读全文
posted @ 2016-03-23 17:41 龟窝
阅读(1239)
评论(0)
推荐(0)
2016年3月20日
json.loads(s) returns error message like this: ValueError: Invalid control character at: line 1 column 33 (char 33)
摘要: json.loads(s) returns error message like this: According to http://docs.python.org/2/library/json.html "If strict is False (True is the default), then
阅读全文
posted @ 2016-03-20 22:05 龟窝
阅读(318)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
8
下一页
公告