03 2016 档案
摘要:res00是一张rgb图 [x for sub1 in res00 for sub2 in sub1 for x in sub2] 列出所有像素值
阅读全文
摘要:>>> 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%
阅读全文
摘要:参考 http://www.cnblogs.com/pzxbc/archive/2012/03/18/2404715.html python的pickle模块实现了基本的数据序列和反序列化。通过pickle模块的序列化操作我们能够将程序中运行的对象信息保存到文件中去,永久存储;通过pickle模块的
阅读全文
摘要:sys.stdout.write('\r'+str) sys.stdout.flush() time.sleep(1)
阅读全文
摘要:Python在往文件里写东西的时候,如果ascii码报错 参考 http://stackoverflow.com/questions/19833440/unicodeencodeerror-ascii-codec-cant-encode-character-u-xe9-in-position-7 Y
阅读全文
摘要: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
阅读全文
摘要:brew link --overwrite python
阅读全文
摘要:http://www.cnblogs.com/xiongqiangcs/p/4914049.html
阅读全文
摘要:https://jjyap.wordpress.com/2014/05/24/installing-opencv-2-4-9-on-mac-osx-with-python-support/ 参照以上blog brew install opencv cd /usr/local/Cellar/openc
阅读全文