Created
July 14, 2011 21:53
-
-
Save insom/1083554 to your computer and use it in GitHub Desktop.
Cycle through a series of stdin lines, updating iChat status.
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
#!/usr/bin/python | |
# For best results: pip install appscript | |
__author__ = "Aaron Brady <[email protected]>" | |
__copyright__ = "Copyright 2011, Aaron Brady, Interactive Web Solutions Ltd." | |
__license__ = "MIT" | |
from appscript import app | |
from time import sleep | |
from sys import stdin, argv | |
ic = app("iChat") | |
lines = stdin.readlines() | |
while True: | |
for line in lines: | |
ic.status_message.set(line.strip()) | |
sleep(int(len(argv) > 1 and argv[1] or 10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment