Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import time
- import thread
- LISTA = '/home/test.txt'
- def abcd1():
- global LISTA
- while true:
- with open(LISTA,'a') as file:
- file.write('<1>')
- if '<2>' in LISTA:
- file.close
- def abcd2():
- global LISTA
- while true:
- with open(LISTA,'a') as file:
- file.write('<2>')
- if '<1>' in LISTA:
- file.close
- thread.start_new(abcd1, ())
- thread.start_new(abcd2, ())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement