a guest May 17th, 2012 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import subprocess, threading, time
- can_break = False
- def run():
- args = ["localtunnel", "8000"]
- popen = subprocess.Popen(args)
- print '%s ended with return code: %d' % (args, popen.returncode)
- t = threading.Thread(target=run)
- while True:
- print 'Main thread...'
- except KeyboardInterrupt:
- can_break = True
RAW Paste Data