Skip to content

Instantly share code, notes, and snippets.

@Rembane
Forked from anonymous/gist:01597554eb515f1f0d39
Last active August 29, 2015 14:16
Show Gist options
  • Save Rembane/475159fad0a5125abeba to your computer and use it in GitHub Desktop.
Save Rembane/475159fad0a5125abeba to your computer and use it in GitHub Desktop.
import sys
from time import sleep
from threading import Thread
def communicator():
print('This does not print')
sys.stdout.flush()
while(True):
#frame.evaluateJavaScript('document.getElementById("footer").appendChild(document.createTextNode("Hejjibejj"));')
#fr.evaluateJavaScript('alert("Yo");')
sleep(1)
print('Evaluated')
print('This prints 1')
# First, create the Thread-object
t = Thread(target=communicator, args=[])
# Then, run it!
t.start()
print('This prints 2');
sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment