-
apache mod_python psp
Feb202014
-
run or spawn in pexpect
Aug102012Pexpect is a Python module for spawning child applications and controlling them automatically. Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup scripts for duplicating software package installations on different ...
阅读全文run or spawn in pexpect已关闭评论
-
useful python modules zz
Feb122011mark zz from http://bbs.chinaunix.net/viewthread.php?tid=1855562 :Graphical interface wxPython http://wxpython.org Graphical interface pyGtk http://www.pygtk.org Graphical interface pyQT http://www.riverbankcomputing.co.uk/pyqt/ Graphical interface Pmw http ...
阅读全文useful python modules zz已关闭评论
-
compile pyhton2.7 with zlib
Jan142011ensure you have installed zlib on your OS. [2hei.net]# rpm -qa|grep zlib zlib-1.2.3-3 zlib-devel-1.2.3-3 use source code to compile python2.7: ./configure –enable-shared && make && make install If you still have this issue: python: error while loading shared libraries: li ...
阅读全文compile pyhton2.7 with zlib已关闭评论
-
write a own tools of WorldTime with pytz
Jun292010require : python2.6 pytz #!/usr/bin/env python# -*- coding: gbk -*-from datetime import datetime, timedeltafrom time import gmtime, strftimefrom pytz import timezoneimport pytz, time,os #def convert_datetime(unix_timestamp=1143408000, tz=1, long_fmt=1): def convert_datetime(dt=’2007-01-01 ...
阅读全文write a own tools of WorldTime with pytz已关闭评论
-
python解析xml的字符集问题的处理
May072010
-
linux下用python实现文本menu
Nov172009linux用shell实现menu比较简单,今天用python实现了一个,因为python没有switch语法,所以使用了dict来替代,另外调用了linux的clear来清屏,本例只是说明一下简单的实现方法,菜单的命令或者语句可以自由发挥 呵呵。 截个图先: 具体代码如下:#!/usr/bin/evn python# -*- coding: utf-8 -*-#Author: 2hei#2hei.net#Da ...
阅读全文linux下用python实现文本menu已关闭评论
-
python 访问带有web认证的页面
Nov052009python 访问带有web认证的页面,经测试方法一可用! #!/usr/bin/env python# -*- coding: utf-8 -*- #方法一#————————————————————–def request_auth_http(url, User = None, Pass = ...
阅读全文作者:u2 | 分类:OpenSource | 标签:pythonpython 访问带有web认证的页面已关闭评论
-
python use BeautifulSoup crawl weather forecast
Sep162009python 使用BeautifulSoup(美汤)来抓取天气预报,简单的例子,只当练手 #!/usr/bin/env python# -*- coding: gb2312 -*- #get weather info from internet#http://weather.china.com.cn/city/54511_full.html import urllib,re,unicodedata,string,sys,refrom BeautifulSoup import * if __name__==”__main__ ...
阅读全文python use BeautifulSoup crawl weather forecast已关闭评论
-
BeautifulSoup has bug in rss tag ‘link’
Sep152009BeautifulSoup 在处理rss页面时发现了如下问题,在rss页面中如果包含<link>标签,BeautifulSoup 处理的不好,具体如下: #!/usr/bin/env python# -*- coding: utf-8 -*- import urllib,re,unicodedata,string,sys,refrom BeautifulSoup import * if __name__==”__main__”: respons ...
阅读全文