Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. =====================
  2. name 'coloring' is not defined
  3.  
  4. # import colorama
  5. # colorama.init()
  6.  
  7. def coloring(string, color):
  8. '''Мой мини-модуль для раскрашивания текста'''
  9. if color == "red":
  10. string = "\x1b[31m" + string + "\x1b[0m"
  11. elif color == "green":
  12. string = "\x1b[32m" + string + "\x1b[0m"
  13. elif color == "yellow":
  14. string = "\x1b[33m" + string + "\x1b[0m"
  15. elif color == "blue":
  16. string = "\x1b[34m" + string + "\x1b[0m"
  17. else:
  18. pass
  19. return string
  20.  
  21.  
  22. if __name__ == '__main__':
  23. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement