Commits

Ronny Pfannschmidt  committed c637085

some minor fixes to somescript

  • Participants
  • Parent commits 329c400

Comments (0)

Files changed (1)

File somescript.py

 
 from gtkloop import GtkLoop
 from gevent.hub import Hub
+import gevent.socket
 
 Hub.loop_class = GtkLoop
 Hub.resolver_class = 'gevent.socket.BlockingResolver'
 
-import gevent
-#gevent.sleep(1)
-
-import gevent.socket
 
 sock = gevent.socket.create_connection(('127.0.0.1', 8000))
 sock.sendall('GET / HTTP/1.1\r\nHost: google.com\r\n\r\n')
+gevent.sleep(0.1)
 print sock.recv(1000)