当前位置: 首页 > python
  • apache mod_python psp

    之前在apache上用python都是通过cgi的方式来调用,这次尝试了一下mod_python模块。

    yum安装apache,python,mod_python。
    安装过程忽略。
    注意python的默认版本,如果有多个版本的话,mod_python还是使用的系统的版本。

    阅读全文
    作者:u2 | 分类:python | 标签:
    apache mod_python psp已关闭评论
  • run or spawn in pexpect

    Pexpect 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 ...

    阅读全文
    作者:u2 | 分类:python | 标签:
    run or spawn in pexpect已关闭评论
  • pexpect Timeout exceeded in read_nonblocking()

    gg resolve from bbs:vi /usr/lib/python2.6/site-packages/pxssh.py#add line 134,135:    123     def synch_original_prompt (self):    124     125         “””This attempts to fi ...

    阅读全文
    作者:u2 | 分类:python
    pexpect Timeout exceeded in read_nonblocking()已关闭评论
  • useful python modules zz

    mark 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 ...

    阅读全文
    作者:u2 | 分类:python | 标签:
    useful python modules zz已关闭评论
  • compile pyhton2.7 with zlib

    ensure 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 ...

    阅读全文
    作者:u2 | 分类:python | 标签:,
    compile pyhton2.7 with zlib已关闭评论
  • DJANGO FORMS:This field is required

    when meet This field is required at django forms, we can add “required=False” at Fields. from django import forms class ContactForm(forms.Form):    subject = forms.CharField(max_length=100)    message = forms.CharField()    sender = forms. ...

    阅读全文
    作者:u2 | 分类:python | 标签:
    DJANGO FORMS:This field is required已关闭评论
  • write nagios nrpe plugin

    Scripts and executables must do two things (at a minimum) in order to function as Nagios plugins:1.Exit with one of several possible return values2.Return at least one line of text output to STDOUT Plugin Return Code Service State Host State0 OK UP1 WARNING UP or DOWN/UNREACHABLE*2 CRITICAL DOWN ...

    阅读全文
    作者:u2 | 分类:OpenSource, python | 标签:
  • write a own tools of WorldTime with pytz

    require : 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 ...

    阅读全文
    作者:u2 | 分类:python | 标签:
    write a own tools of WorldTime with pytz已关闭评论