Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/python
- import cgi, cgitb
- import time
- import threading
- class TestThread(threading.Thread):
- def __init__(self):
- super(TestThread, self).__init__()
- def run(self):
- time.sleep(5)
- fileHand = open('../Documents/writable/output.txt', 'w')
- fileHand.write('Big String Goes Here.')
- fileHand.close()
- print 'Starting Program'
- thread1 = TestThread()
- #thread1.daemon = True
- thread1.start()
- #!/usr/local/bin/python
- import time
- from multiprocessing import Process, Pipe
- def f():
- time.sleep(5)
- fileHand = open('../Documents/writable/output.txt', 'w')
- fileHand.write('Big String Goes Here.')
- fileHand.close()
- if __name__ == '__main__':
- print 'Starting Program'
- p = Process(target=f)
- p.start()
- //PHP
- exec("php child_script.php > /dev/null &");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement