Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import cmd
  4.  
  5. ASCII = """
  6. .-. . .-. . ..---.. . .
  7. ( ) o | ( )| || | | .'|
  8. `-. . .--.--. .,-. | .-. `-. |---||--- | | . ._|
  9. ( ) | | | | | )|(.-' ( )| || | | \ / |
  10. `-'-' `-' ' `-|`-' `-`--' `-' ' ''---''---''---' `' '---'
  11. |
  12. """
  13.  
  14. class CLI(cmd.Cmd):
  15.  
  16. def __init__(self):
  17. cmd.Cmd.__init__(self)
  18. self.prompt = 'SHELL >> '
  19.  
  20. def onecmd(self, s):
  21. if s in ['quit', 'exit']:
  22. exit(0)
  23. else:
  24. print s
  25.  
  26. def do_EOF(self, s):
  27. return True
  28.  
  29. def default(self, line):
  30. return
  31.  
  32. try:
  33. cli = CLI()
  34. cli.cmdloop(ASCII)
  35. except:
  36. print ''
  37. exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement