howmuch515

color_log.py

Oct 22nd, 2018
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. #-*- coding:utf-8 -*-
  3.  
  4. def info(message):
  5.     print("\033[0;34m[+] " + message + "\033[0;39m")
  6.    
  7. def warning(message):
  8.     print("\033[0;33m[-] " + message + "\033[0;39m")
  9.  
  10. def result(message):
  11.     print("\033[0;32m[*] " + message + "\033[0;39m")
  12.  
  13. def error(message):
  14.     print("\033[0;31m[!] " + message + "\033[0;39m")
  15.    
  16.  
  17. if __name__=='__main__':
  18.     info("info!")
  19.     warning("warning!")
  20.     result("result!")
  21.     error("error!")
Advertisement
Add Comment
Please, Sign In to add comment