Python学习积累《二》
2013-09-15 10:23
169 查看
[b]1.Python学习积累《二》 Python的内省机制[/b]
/article/8090122.html
[b]2.Python 命名规范[/b]
3. Python模块学习 ---- httplibHTTP协议客户端实现
http://www.sandzhang.com/blog/2010/04/09/pyhon-use-httplib-send-http-get-post/
http://blog.sina.com.cn/s/blog_524524850100vfbj.html (提交表单数据)
4. Python中 函数返回多个值
5. Python 从数据读取数据,并逐行写入到文本文件。
/article/8090122.html
[b]http://my.oschina.net/hcp/blog/40979[/b]
3. Python模块学习 ---- httplibHTTP协议客户端实现
http://blog.csdn.net/JGood/article/details/4317416
http://www.sandzhang.com/blog/2010/04/09/pyhon-use-httplib-send-http-get-post/
http://blog.sina.com.cn/s/blog_524524850100vfbj.html (提交表单数据)4. Python中 函数返回多个值
class MultiReturn: def__init__(self,name,age): self.Name=name self.Age=age def printinfo(self): return self.Name,self.Age test=MultiReturn('Cheers Li',29) aa=test.printinfo() print aa[0] print aa[1] |
import MySQLdb f=open('D:\\temp\\testdata\\test1.txt','w') conn =MySQLdb.connect(host="192.168.1.23",\ user="root", \ passwd="password", \ db="sstestpfm1") cursor = conn.cursor() cursor.execute("select fileserver_user.identifier fromfileserver_user;") for row in cursor.fetchall(): for pair in zip(row): a='%s'%pair printa f.write(a+'\n') f.close() cursor.close() conn.close() |
相关文章推荐
- python3.4学习的点点滴滴、不断的积累
- Python 学习积累《一》
- TensorFlow 学习积累(2): Python类中的__init__() 和 self
- Python 学习积累《一》
- Python 学习积累《三》 多线程
- JAVA从菜鸟【入门】到新手【实习】一一转入第二语言Python学习“灵活学习,学练结合,经验积累”
- Python学习积累《一》
- Python 学习积累《二》 Python的内省机制
- Python积累学习(一)ftp上传或下载操作
- Python爬虫包 BeautifulSoup 学习(九) 正则表达式与Lambda表达式
- Python学习记录02
- Python学习第四天-算术运算符及优先级
- Python学习之路13——字符串2
- python学习中级,纯代码学习版
- 【Python学习系列二十九】scikit-learn库实现天池平台智慧交通预测赛
- (Python学习4)List对象
- Python 模块学习
- python学习(二)、基本语法概览
- 学习使用python中唯一“非转基因”的http库----requests,第一篇
- python进阶学习笔记(四)——python中访问限制、创建类属性、定义实例方法、定义类方法、类的继承