python
ljdam
这个作者很懒,什么都没留下…
展开
-
SQLAlchemy数据库操作例子
[code="python"] #建表 from sqlalchemy import create_engine,Table,Column,Integer,String,MetaData,ForeignKey engine = create_engine('sqlite:///:memory:',echo=True) metadata = MetaData() users = Table...原创 2011-09-15 15:52:37 · 119 阅读 · 0 评论 -
Python下载文件,显示进度
[code="java"] import urllib url = "http://www.top100.cn/download/dl.php?n=Eat+Dirt.mp3&al=sgchdnctugy" file = "e:/test.mp3" def reporthook(blocks_read,block_size,total_size): if not blocks_...2012-02-21 10:01:56 · 382 阅读 · 0 评论 -
mutagen使用简介
[code="java"] #-*- coding:utf-8 -*- from mutagen.mp3 import MP3 from mutagen.easyid3 import EasyID3 def print_id3(id3info): print print '%-13s\t%s' % ('Field', 'Value') print '-...2012-02-21 13:43:31 · 668 阅读 · 0 评论