This repository has been archived by the owner on Nov 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made the examples actually use Clint.
- Loading branch information
brownhead
committed
Nov 5, 2013
1 parent
2a890e6
commit 9d06f66
Showing
3 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#!/usr/env/bin python | ||
|
||
from clint.textui import puts, colored | ||
import sys | ||
|
||
def foo(): | ||
print "I am a mighty foo function!" | ||
puts(colored.red("I am a mighty foo function!")) | ||
sys.exit(0) | ||
|
||
def bar(): | ||
print "Nice to meet you, I am bar." | ||
puts(colored.blue("Nice to meet you, I am bar.")) | ||
sys.exit(1) | ||
|
||
if __name__ == "__main__": | ||
print "Running as a script!" | ||
puts("Running as a script!") | ||
sys.exit(2) |