Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import copy
  4. import random
  5. import time
  6.  
  7. # DEFAULT FOLDER
  8. wallpapers = '/home/test/Pictures/Wallpapers/'
  9.  
  10. def interval_wall(seconds):
  11. walls_remaining = copy.deepcopy(wallpapers)
  12. while True:
  13. time.sleep(seconds)
  14. rand_wall = random.choice(walls_remaining)
  15. print(rand_wall)
  16. walls_remaining.remove(rand_wall)
  17. if len(walls_remaining) == 0:
  18. walls_remaining = copy.deepcopy(wallpapers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement