python
煎饼皮皮侠
这个作者很懒,什么都没留下…
展开
-
python下安装lxml
安装python的lxml时,用了很多方法找不到自己想要的,最后直接在cmd下,输入easy_install lxml,居然直接给安装好了,太神奇了!参考:http://www.cnblogs.com/zhuyp1015/archive/2012/07/17/2596495.html原创 2013-10-22 10:09:38 · 8458 阅读 · 0 评论 -
python xml.dom.minidom.parse not well-formed error
用python解析xml,遇到以下error,ParseError: not well-formed (invalid token): line 1, column 17因为xml文件中有以下一段文字, 2016年1月2日 if(window.yzq_d==null)window.yzq_d=new Object();window.yzq_d['vYTLAWRhZD8-']原创 2015-12-24 10:15:44 · 3672 阅读 · 0 评论 -
运用ocropy时报numpy.dot() fails when using keyword argument "out"的错误
运用ocropy时报numpy.dot() fails when using keyword argument "out"的错误解决方案:查了好久,基本没有遇到这个问题的,终于在以下这篇文章中断定是numpy的版本有问题,http://grokbase.com/t/scipy.org/numpy-tickets/12bestzp7f/numpy-2248-numpy-d原创 2015-09-16 17:15:07 · 822 阅读 · 0 评论 -
flask接受jquery ajax传递过来的参数
I have been working with similar functionality and after a bit of messing around with the ajax and python, this is what I came up with for python reading the ajax dataJavaScript:var data = {原创 2015-07-23 17:49:34 · 13720 阅读 · 3 评论 -
ipython notebook error: [Errno 99] Cannot assign requested address
安装ipython时,要先按照python-dev,然后安装,pip install "ipython[all]"即可。但是在启动时(ipython notebook),却报错了:ipython notebook error: [Errno 99] Cannot assign requested address查资料。步骤:1. 执行ipyt原创 2015-07-21 23:13:41 · 8230 阅读 · 1 评论 -
install MySQL-python
如果想要用Python链接mysql,需要先安装MySQL-python,步骤1:执行:pip install MySQL-python如果报以下错误:EnvironmentError: mysql_config not found----------------------------------------Command python setup.py egg_inf原创 2015-07-01 17:26:32 · 503 阅读 · 0 评论 -
pip Could not fetch URL的解决方案
今天在用sudo pip install sunburnt时,出现了如下错误:Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /s原创 2015-05-21 17:34:02 · 33042 阅读 · 2 评论 -
python 处理中文时出现的错误'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)" 解决方法
python xml处理中文时出现的错误,记录一下,以免忘记 "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)"解决办法,在该python文件的前面加上如下几句,问题得到解决。import sysdefault_en转载 2015-01-30 17:04:01 · 6636 阅读 · 0 评论 -
pymongo group的用法
pymongo group的用法,参考:http://www.tuicool.com/articles/i6n6Vv原创 2014-09-12 10:25:42 · 2375 阅读 · 0 评论 -
简单python爬虫
一段简单的 Python 爬虫程序,用来练习挺不错的。#读出一个URL下的a标签里href地址为.html的所有地址一段简单的 Python 爬虫程序,用来练习挺不错的。#读出一个URL下的a标签里href地址为.html的所有地址#!/usr/bin/python# Filename: test.pyimport urllibcontent = urllib.urlo转载 2014-07-13 22:32:35 · 962 阅读 · 0 评论 -
selenium和casperjs2种数据抓取方式(进来的朋友请留言,共同探讨)
今天用selenium和casperjs2种对数据抓取方式原创 2014-04-11 17:58:46 · 2956 阅读 · 1 评论 -
python NLTK学习
参考网址:http://blog.csdn.net/huyoo/article/details/12188573原创 2014-05-14 18:20:11 · 531 阅读 · 0 评论 -
python读取json文件,并将数据插入到mongodb
#coding=utf-8import sunburntimport urllibfrom pymongo import Connectionfrom bson.objectid import ObjectIdimport loggingfrom datetime import datetimeimport jsonfrom time import mktimefrom fee原创 2014-04-18 17:42:16 · 9294 阅读 · 0 评论 -
xpdf的使用
xpdf的安装:sudo apt-get install xpdf 参照:原创 2014-05-14 17:44:17 · 2781 阅读 · 0 评论