A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

23 lignes
631 B

  1. # -*- coding: utf-8 -*-
  2. import time
  3. from subprocess import *
  4. try:
  5. from config import irc, main, schedule, secure, watcher
  6. except ImportError:
  7. print """Missing a config file! Make sure you have configured the bot. All *.py.default files in config/
  8. should have their .default extension removed, and the info inside should be corrected."""
  9. exit()
  10. def main():
  11. while 1:
  12. call(['python', 'core/main.py'])
  13. time.sleep(5) # sleep for five seconds between bot runs
  14. if __name__ == "__main__":
  15. try:
  16. main()
  17. except KeyboardInterrupt:
  18. exit("\nKeyboardInterrupt: stopping bot wrapper.")