![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
andych008
这个作者很懒,什么都没留下…
展开
-
我为什么也选择了 python
from: http://www.chinesepython.org/cgi_bin/moingb.cgi/_ce_d2_ce_aa_ca_b2_c3_b4_d2_b2_d1_a1_d4_f1_c1_cb_20python我为什么也选择了python -- glace转载 2011-08-26 22:24:11 · 487 阅读 · 0 评论 -
Python web frame:Bottle
sshttp://bottlepy.org/docs/dev/http://tocode.sinaapp.com/18安装Install the latest stable release via PyPi (easy_install -U bottle)设置设置Aptana Studio 3,不然找不到代码提示Window -> Pre原创 2013-03-19 14:01:42 · 905 阅读 · 0 评论 -
hello_charset1.py
s# -*- coding: utf-8 -*-print 'hello world哈''''用 u'汉字' 构造出来的是unicode类型,不用的话构造出来是str类型 str的编码是与系统环境相关的,一般就是sys.getfilesystemencoding()得到的值 所以从unicode转str,要用encode方法 decode是任何字符串具有的方法,将原创 2013-03-20 13:43:54 · 558 阅读 · 0 评论 -
第一个wxPython及转化成exe
sss转:http://laochake.iteye.com/blog/438667转:http://blog.csdn.net/suiyunonghen/article/details/4033076环境配置见:begin Python第一个wxPython应用app1.pyimport wxif __name__ == '__main__': app =原创 2012-09-26 19:44:56 · 3322 阅读 · 0 评论 -
my py toLearn list
slogging -----> easylogbottle----->todo, tplwxPythons原创 2013-04-09 00:11:33 · 656 阅读 · 0 评论 -
python日志:easylogger
s没有搞定,先用自带的logging吧!easylogger是对logging的封装,详见:https://code.google.com/p/easy-logger/另一个logutils:https://code.google.com/p/logutils/安装easy_install easylogger使用在线帮助:http://easy-l原创 2013-04-08 21:46:17 · 1119 阅读 · 0 评论 -
python日志:logging
s代码主要是转别人的http://www.cnblogs.com/Jerryshome/archive/2012/02/01/2334444.htmlhttp://www.cnblogs.com/Jerryshome/archive/2012/11/27/2791416.html我是在他的第一版的基础上改的,然后有一些分析,最新版的还木有看,谢谢原作原创 2013-04-09 13:40:23 · 752 阅读 · 0 评论 -
第一个wxPython及转化成exe(二)
shttp://blog.csdn.net/xtx1990/article/details/7185289中文的问题src下创建文件sitecustomize.pyimport sysreload(sys)sys.setdefaultencoding('utf8')在app.py中# coding=ut原创 2013-04-08 14:39:44 · 1326 阅读 · 0 评论 -
Selenium python
s我的环境mac os10.7(python2.7.3)(chrome 26.0.1410.65)基础:https://code.google.com/p/selenium/wiki/GettingStartedhttp://docs.seleniumhq.org/docs/appendix_installing_python_driver_client.jsp原创 2013-04-12 03:48:35 · 985 阅读 · 0 评论 -
begin Python
s安装包:http://www.python.org/download/releases/下载安装python-2.7.3.msi,配置path"D:\Python27"IDE:Aptana 也可以写ruby ror css xml jshttp://www.aptana.com/products/studio3/download安装IPython原创 2012-09-17 18:17:28 · 989 阅读 · 0 评论 -
IOS IAP serverCheck by python
s第一个版本:http://www.myexception.cn/perl-python/416264.htmliap支付服务器验证python版本客户端支付成功,发送信息到服务器,进行二次验证。#-*- coding: utf-8 -*-from django.http import HttpResponse, HttpResponseRedirectimport sim转载 2013-04-27 16:17:13 · 1009 阅读 · 0 评论 -
IOS IAP serverCheck by python(二)
用Bottle的web框架,用百度云的服务。sapp.conf这个文件,设置route,和静态文件(不支持代码设置静态路径,bae的安全机制)handlers: - url : / script: main.py - url : /verifyReceipt script: main.py - url : /(.*)原创 2013-04-28 15:13:35 · 1116 阅读 · 0 评论 -
Mac OS X 中安装 brew
先安装Git,打开一个shellcd /usr/localsudo mkdir homebrewcurl -L https://github.com/mxcl/homebrew/tarball/master | sudo tar xz --strip1 -C homebrewcd homebrew/bin./brew -vfile brewcat bre转载 2013-04-14 02:29:51 · 2701 阅读 · 0 评论 -
Python 实现base64加密和解密
s加密#!/usr/bin/env python# coding=utf-8import base64#编码fin = open(r"1.png", "rb")fout = open(r"new.base64", "w")base64.encode(fin, fout)fin.close()fout.close()解密#!/usr/bin/env转载 2013-03-14 20:14:15 · 2133 阅读 · 0 评论 -
python统计文本文件的字数
s转的,出处找不到了。还有这个也不错:https://code.google.com/p/pyzh/统计文本文件的字数,从当前目录下的file.txt取文件# -*- coding: GBK -*-import stringimport sysreload(sys)def compareItems((w1,c1), (w2,c2)): if c1 > c2转载 2013-03-05 17:31:54 · 5913 阅读 · 1 评论 -
python shell help
s查看wx.Frame的构造函数import wxhelp(wx.Frame.__init__)ss原创 2013-03-05 17:20:32 · 769 阅读 · 0 评论 -
python res
http://mirrors.sohu.com/python/src/ftp://ftp.warwick.ac.uk/pub/misc/python1.0.1.tar.gz原创 2012-02-08 11:40:02 · 2568 阅读 · 0 评论 -
egg文件安装
from:http://blog.csdn.net/hong201/article/details/4219035http://peak.telecommunity.com/DevCenter/EasyInstall 2.egg文件安装羡慕cetos的yum,羡慕Ubuntu的apt-get,羡慕ruby的gem,现在python的egg成熟转载 2012-04-19 19:47:28 · 4553 阅读 · 0 评论 -
python&Ruby
tornado一句话:Tornado是非阻塞式Web 服务器框架OverviewFriendFeed使用了一款使用 Python 编写的,相对简单的 非阻塞式 Web 服务器。其应用程序使用的 Web 框架看起来有些像 web.py 或者 Google 的 webapp, 不过为了能有效利用非阻塞式服务器环境,这个 Web 框架还包含了一些相关的有用工具 和优化。T原创 2012-04-24 10:21:48 · 500 阅读 · 0 评论 -
python http
surllib2提交http post请求转:http://finux.iteye.com/blog/786823接着用它来模拟下xiami的登录#!/usr/bin/python#coding=utf-8import urllibimport urllib2def post(url, data): req = urllib2.Request(url)原创 2012-09-28 17:35:06 · 859 阅读 · 0 评论 -
python xml test 遍历element attr textNode
我的环境是python 2.7.3 on windows# coding=utf-8#xml 节点结构可参见D:\Python27\Lib\xml\dom\minidom.py中的继承关系from xml.dom import minidom# 工具方法:转node类型为字符串# tool method: conv node type from int to strdd原创 2012-09-28 11:02:54 · 1898 阅读 · 0 评论 -
IPython 笔记
参考http://www.douban.com/note/206236743/D:\Python27\Scripts\ipython.exe#启动ipythonhelp()#进入帮助------自动补全功能需要单独安装pyreadline模块,下载地址http://launchpad.net/pyreadline/1.6/1.6.1/+download/py转载 2012-09-18 12:54:56 · 617 阅读 · 0 评论 -
比较几种编程语言
from:http://www.cnblogs.com/liuyunfeng/archive/2012/07/31/2616537.html数据类型这里数据类型指的是内部数据类型,不考虑语言内部的自动转换。 C++javajavascriptphppythonruby转载 2012-10-10 11:42:24 · 459 阅读 · 0 评论 -
浅析Python中的struct模块
l转:http://www.cnblogs.com/coser/archive/2011/12/17/2291160.html最近在学习python网络编程这一块,在写简单的socket通信代码时,遇到了struct这个模块的使用,当时不太清楚这到底有和作用,后来查阅了相关资料大概了解了,在这里做一下简单的总结。 了解c语言的人,一定会知道struct结构体在转载 2012-09-26 14:25:40 · 739 阅读 · 0 评论 -
YAML 简介
YAML Ain't Markup Language和GNU一样,YAML是一个递归着说“不”的名字。不同的是,GNU对UNIX说不,YAML说不的对象是XML。YAML不是XML。 为什么不是XML呢?因为:YAML的可读性好。YAML和脚本语言的交互性好。YAML使用实现语言的数据类型。YAML有一个一致的信息模型。YAML易于实现。转载 2012-10-19 15:38:07 · 1060 阅读 · 0 评论 -
我常用的几个第三方 Python 库
作者:赖勇浩(http://blog.csdn.net/lanphaday)今天公司停电,没上班。跑上来更新个博客,跟大家分享一下我常用的几个第三方 Python 库。Python 语言之所以能够如此流行,除了本身内置许多程序库来保障快速开发之外,目不睱接的第三方库也是一大主因。结合我目前的工作(网游开发),我常用的几个第三方库如下:wxPython如果你之前是 windows转载 2012-10-25 16:52:10 · 714 阅读 · 0 评论 -
SimpleHTTPServerWithUpload.py
s文章内容主要来自以下网页http://www.lifeba.org/arch/python_http_simplehttpserver_basehttpserver_cgihttpserver.htmlhttp://georgik.sinusgear.com/2011/01/07/how-to-dump-post-request-with-python/让SimpleHT转载 2012-11-21 18:42:04 · 1297 阅读 · 0 评论 -
dotcloud初步
在https://www.dotcloud.com/先注册账号然后下面是在本地setup和check$ dotcloud setupdotCloud username or email: andych008Password:==> dotCloud authentication is complete! You are recommended to run原创 2012-12-26 14:58:47 · 765 阅读 · 0 评论 -
python tips
s指定文件编码方法一:# coding=utf-8print 'hello world哈'方法二:# -*- coding: utf-8 -*-print 'hello world哈'str(),repr()内建函数str()和repr()或反引号操作符(``)可以方便地以字符串的方式获取对象的内容、类型、数值属性等信息。str()函数得到的字符串可原创 2012-09-21 08:31:53 · 925 阅读 · 0 评论