2012.09.10 19:50

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)

Posted by k1rha