
Python语言
iteye_1291
这个作者很懒,什么都没留下…
展开
-
python读写csv文件
python读写csv文件 [code="java"] #!/usr/bin/python # -*- coding: UTF-8 -*- import csv def writer (): aa = csv.writer(file('z.csv', 'wb')) aa.writerow(['c1', 'c2', 'c3']) lines = [ra...原创 2012-07-16 15:55:13 · 113 阅读 · 0 评论 -
python+web.py实现hello world
1,确定系统中存在python环境 以下介绍基于 ubnntu 12.04 amd64 python 2.7.3 2,安装web.py [code="java"] wget http://webpy.org/static/web.py-0.37.tar.gz tar -xvzf web.py-0.37.tar.gz cd web.py=0.37 python setup....原创 2012-07-18 18:34:58 · 185 阅读 · 0 评论 -
【趣味shell&python】倒三角控制台输出图形
通过脚本实现如下效果 1,python实现 #!/usr/bin/python # filename:demo.py # -*- coding: UTF-8 -*- if __name__ == '__main__': n = 20 for i in range(1, n): m = i * 2 - 1 char1 = " " ...原创 2012-07-18 19:44:07 · 862 阅读 · 0 评论 -
webbench对nginx+web.py的hello.py测试
1,访问效果 [code="java"] curl http://127.0.0.1:8000/hello Hello World!d curl http://python.i-david.org/hello Hello World!d [/code] 2,基本部署 启动脚本 [code="java"] #!/bin/sh ps -aux | grep 8000 ...原创 2012-07-19 18:25:02 · 104 阅读 · 0 评论 -
Editplus配置python开发环境
1,环境介绍 windows 7 64 editplus v3.4.1 python 2.7.3 2,在Editplus中添加插件 Tools-->Configure User Tools… 3,添加python执行环境 Tools-->User tools 4,配置 Output patte...原创 2012-07-21 07:38:24 · 154 阅读 · 0 评论 -
通过python获取外网IP
通过python获取外网IP [code="python"] #!/usr/bin/python # -*- coding:utf-8 -*- # filename:getLocalIp.py import re,urllib2 class Getmyip: def getip(self): try: myip = self.vis...原创 2012-08-01 18:13:31 · 122 阅读 · 0 评论 -
nginx+uwsgi+python web发布
1,nginx,python web的环境已经配置好了,重点介绍uwsgi的使用 2,python web程序 [code="python"] david@david-server:~/python$ cat start.py import web urls = ( '/.*', 'index' ) class index: def GET(self)...原创 2012-08-22 10:25:46 · 90 阅读 · 0 评论 -
python 中文转拼音
1,源码 [code="python"] #!/usr/bin/python # -*- coding:utf-8 -*- # filename:demo.py table = 'a,-20319;ai,-20317;an,-20304;ang,-20295;ao,-20292;ba,-20283;bai,-20265;ban,-20257;bang,-20242;bao,-20...原创 2012-09-16 17:38:25 · 356 阅读 · 0 评论 -
git for eclipse
1,安装git apt-get install git 2,安装EGit插件 http://download.eclipse.org/egit/updates 3,配置ssh认证信息 Windows-->Preferences-->General-->Network connection-->SSH2 一般会自动设置 4,创建项目,加入git Team--> Sha...原创 2012-11-11 21:17:10 · 107 阅读 · 0 评论