from array import *
from subprocess import *
from socket import *
import os
SEND_MSG =""
PROCCESS_PATH ="checkList.conf"
PROCLIST_FILE = open(PROCCESS_PATH,'r')
PATH_LIST = PROCLIST_FILE.readlines()
flag = 0
i=0;
while len(PATH_LIST)>i :
# print(PATH_LIST[i])
pipe = os.popen(PATH_LIST[i])
RESULT_VALUE = pipe.readlines()
j=0
if(len(RESULT_VALUE[j])<1) :
SEND_MSG = PATH_LIST[i]+"can`t resume !! "
break
while len(RESULT_VALUE) > j :
SEND_MSG =SEND_MSG+RESULT_VALUE[j]
j=j+1
i=i+1
pipe.close()
print(SEND_MSG)
'Python' 카테고리의 다른 글
[python 2.7 ] 경로에서 파일명이나 경로만 파싱하기 (0) | 2012.09.26 |
---|---|
[python 2.7] Reverse TCP connection Simple code (0) | 2012.09.25 |
python socket 작업 중 에러 발생 (0) | 2012.08.17 |
[ Python ] 전역변수 설정법 (global value ) ex. thread (0) | 2012.08.09 |
[ python 3.2 ] thread -> _thread (0) | 2012.07.18 |