django 各种常用模块:sudo pip installdjango-celerysudo pip installdjango-compressorsudo pip install django-bootstrap-formsudo pip install sorl.thumbnailsudo ...
分类:
其他好文 时间:
2014-12-08 17:34:38
阅读次数:
202
用easy_install和pip来安装第三方库很方便它们的原理其实就是从Python的官方源pypi.python.org/pypi 下载到本地,然后解包安装。不过因为某些原因,访问官方的pypi不稳定,很慢甚至访问不了。跟ubuntu的apt和centos的yum有各个镜像源一样,pypi也有。...
分类:
编程语言 时间:
2014-12-08 17:27:51
阅读次数:
213
代码:import MySQLdbconn=MySQLdb.connect(host='127.0.0.1', user='root', passwd='root', db='test', port=3306)cur=conn.cursor()row = cur.execute('select * ...
分类:
数据库 时间:
2014-12-08 12:17:46
阅读次数:
205
网站就是要和数据库进行交互,否则什么都不用做了...今天我们来看一个叫MySQLdb的库,这个用来和MySQL数据库进行交互. 可以从这里获得这个库 http://sourceforge.net/projects/mysql-python 如果你不确定你的pytho...
分类:
数据库 时间:
2014-12-05 21:27:10
阅读次数:
177
windows下安装PIP当前环境(windows7,python安装路径为c:\Python)1.首先到官网下载(https://pypi.python.org/pypi/setuptools#downloads)下载文件地址:https://bootstrap.pypa.io/ez_setup.py,并将其放入python安装目录(C:\Python)2.打开cmd窗口C:\Python>python.exe..
wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.pysudo python ez_setup.pysudo easy_install pipsudo pip install ipython
分类:
编程语言 时间:
2014-12-05 01:56:03
阅读次数:
168
http://blog.csdn.net/yelbosh/article/details/7498641数据库的连接模块引入之后我们就需要和数据库进行连接了,实例代码如下:db = MySQLdb.connect("localhost","root","123456","myciti" )这三个关键...
分类:
数据库 时间:
2014-12-05 00:35:02
阅读次数:
239
gunicorn 是一款支持wsgi的web服务器, 支持gevent首先安装setuptools. wgethttps://bootstrap.pypa.io/ez_setup.py$python ez_setup.py$easy_install pip$pip install gevent$pi...
分类:
编程语言 时间:
2014-12-05 00:28:18
阅读次数:
307
Requests 是用Python语言编写,基于 urllib,采用 Apache2 Licensed 开源协议的 HTTP 库。它比 urllib 更加方便,可以节约我们大量的工作,完全满足 HTTP 测试需求一、安装 Requests通过pip安装Code example:1$ pipinsta...
分类:
编程语言 时间:
2014-12-04 19:56:10
阅读次数:
266
Redis监控系统
系统项目可以从https://github.com/nkrode/RedisLive下载
git clone git@github.com:nkrode/RedisLive.git
这个系统是依据python写的需要安装一些python环境
tornado pip
install tornado
redis.py pip
install redis
...
分类:
其他好文 时间:
2014-12-04 14:05:10
阅读次数:
160