You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
660 B

6 years ago
  1. import pygame, logging, urllib.request, io
  2. from time import sleep
  3. def r9k(window):
  4. logging.warn("Look, you found a pepe!")
  5. raw_image = urllib.request.urlopen("http://img.ifcdn.com/images/620f230fad2806fe5305fac45dd673b8fc005b98c1e3b8584abc9c439b050950_1.jpg").read()
  6. image_file = io.BytesIO(raw_image)
  7. image = pygame.transform.scale(pygame.image.load(image_file), window.get_size())
  8. window.blit(image, (0,0))
  9. font = pygame.font.SysFont(None, 30, bold=False)
  10. window.blit(font.render("A rare pepe has been found. Alert R9k", True, (0,0,0)), (window.get_width()/2-175, window.get_height()/2))
  11. pygame.display.update()
  12. sleep(9)