This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;; | |
; Pool Definitions ; | |
; 只关注需要修改的配置; | |
;;;;;;;;;;;;;;;;;;;;;;; | |
; 以登陆用户的用户名和分组,避免权限问题 | |
user = baocaixiong | |
group = staff | |
; The address on which to accept FastCGI requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" An example of a Linux daemon written in Python. | |
Based on http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ | |
The changes are: | |
1 - Uses file open context managers instead of calls to file(). | |
2 - Forces stdin to /dev/null. stdout and stderr go to log files. | |
3 - Uses print instead of sys.stdout.write prior to pointing stdout to the log file. | |
4 - Omits try/excepts if they only wrap one error message w/ another. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf8 -*- | |
import time,sys | |
def progressbar(): | |
print 'Loading...' | |
print "[+] start to build...." | |
height = 4 | |
for i in range(0, 100): | |
if i > 0: | |
sys.stdout.write(u'\u001b[1A') | |
time.sleep(0.1) |
OlderNewer