Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. while 1:
  2. # Decode and Save Image
  3. imgdata = base64.b64decode(data)
  4. stream = io.BytesIO(imgdata)
  5.  
  6. # Display realtime gameplay
  7. im = plt.imread(stream,"bmp")
  8. if frame is None:
  9. print "Start Rendering.."
  10. frame = plt.imshow(im)
  11. plt.show()
  12. else:
  13. frame.set_data(im)
  14. plt.pause(0.00000001)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement