-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathListener.py
41 lines (32 loc) · 907 Bytes
/
Listener.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: RedSpiderMkV
#
# Created: 17/06/2014
# Copyright: (c) RedSpiderMkV 2014
# Licence: <your licence>
#-------------------------------------------------------------------------------
import os
from threading import Thread
host = '192.168.0.11'
port = 8088
bufferSize = 4096
addr = (host, port)
runner = r'C:\Python27\python.exe Runner.py {0} {1}'
def executeRunner():
os.system(str.format(runner, host, port))
def main():
while True:
t1 = Thread(target=executeRunner, args=())
t1.start()
t1.join()
if __name__ == '__main__':
main()
#t1 = thread.start_new_thread(executeRunner, ())
#while True:
#subprocess.Popen(["python", "runner.py"], stdout=subprocess.PIPE)
# a = raw_input('Enter 0 to exit')
# if a == '0':
# break;