This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
The **runtests.py** script supports simple test discovery (both `doctest`_ and `unittest`_) | |
and running discovered tests. | |
* ``-s DIRECTORY`` Directory to start discovery ('.' default) | |
* ``-t DIRECTORY`` Top level directory of project (default to start directory) | |
How to use:: |
This file contains hidden or 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
def iterate_recursively(*objects): | |
""" | |
Makes an iterator that returns elements from the `objects` argument. | |
If an element is a list or tuple, the element will be iterated | |
recursively, and the iterator returns each items. | |
>>> list(iterate_recursively(1, 2, 3)) | |
[1, 2, 3] | |
>>> list(iterate_recursively([1, 2, 3])) | |
[1, 2, 3] |
This file contains hidden or 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 tiny module provides ANSI color formatting. | |
ANSI escape code - Wikipedia, the free encyclopedia | |
http://en.wikipedia.org/wiki/ANSI_escape_code | |
>>> colorize("") | |
'' | |
>>> colorize("black and white") | |
'black and white' |
This file contains hidden or 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
#/bin/bash | |
# | |
# itunes.sh - Control Your iTunes from shell | |
# | |
TRACK_PROGRAM=`cat <<EOS | |
tell current track | |
name & " - " & artist | |
end tell | |
EOS` |
This file contains hidden or 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
#!/usr/bin/env python | |
# vim: set filetype=python : | |
""" | |
Synopsis | |
================================ | |
*objcfmt* is the code formatter for Objective-C source programs. |
NewerOlder