![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
咖啡大咖
这个作者很懒,什么都没留下…
展开
-
python os.path模块
os.path.abspath(path) #返回绝对路径os.path.basename(path) #返回文件名os.path.commonprefix(list) #返回list(多个路径)中,所有path共有的最长的路径。os.path.dirname(path) #返回文件路径os.path.exists(path) #路径存在则返回True,路径损坏返回Fal转载 2014-05-08 15:50:52 · 438 阅读 · 0 评论 -
python连接mysql
坚持每天学一点,每天积累一点点,作为自己每天的业余收获,这个文章是我在吃饭的期间写的,利用自己零散的时间学了一下python操作MYSQL,所以整理一下。我采用的是MySQLdb操作的MYSQL数据库。先来一个简单的例子吧:?12345678910impo转载 2014-04-26 18:56:18 · 531 阅读 · 0 评论 -
python 用mysqldb方式操作数据库
# -*- coding: utf-8 -*-from User import Userimport time, MySQLdb#连接conn = MySQLdb.connect(host='localhost', user='root', passwd='root', db='test', charset='utf8')cursor = conn.cursor()#写入# sq原创 2014-04-28 19:35:45 · 429 阅读 · 0 评论 -
nginx uwsgi 部署django
1.安装django2.安装flup3.安装uwsgi原创 2014-04-28 23:08:24 · 626 阅读 · 0 评论 -
MAC 安装 PIL
安装完PIL,在处理jpg时,竟然提示“decoder jpeg not available”,搜之原来是PIL安装没有提供对jpeg的支持。首先卸载已经安装的PIL:在Mac下,找到site-packages可用如下方法:[python] view plaincopyimport django dir(django)转载 2014-06-07 14:59:42 · 494 阅读 · 0 评论