El Rancho San Benito Community Resource Website
San Benito County Community Resource Website

--Paul McNett, Earthling
Home
XML

PyCon 2006 A Huge Success, and a big thanks to Andrew Kuchling - Mar 01, 2006 14:09
I just returned from the U.S. Python Conference, affectionately known as
PyCon 2006. This was the third PyCon I've attended, and by far the best.
A warm thank you to Andrew Kuchling and all the volunteers that made this
work.

If you are a Python user or developer, please come next year and meet your
fellows. And if your company uses and profits from Python's existence,
you really need to become a sponsor of the Python Software Foundation, to 
further the work of developing and marketing this excellent product.

Kudos to AMK and all the volunteers. See you again in 2007!

© 2006 Paul McNett       [/Computing/Programming/Python] permanent link


My Useful Python script: keep KQED alive from 5am to 7pm - Jul 08, 2004 15:16
Every morning, my Linux box plugged into my amplifier plugged into speakers
in my bedroom starts up RealPlayer and connects to KQED, the San Francisco
affiliate of National Public Radio. As I can hear these speakers from most
areas of the house, I like to leave it on past morning shower time.

Using cron, it is easy enough to start KQED at 5 am with a crontab entry
such as:


	00 05 * * 0-6 realplay http://www.kqed.org/w/streamingfiles/kqed_real.ram


However, frequently enough (1-10 times per day), probably ultimately due to
network issues on the KQED side, the realplayer process kills itself, requiring
me to start it again manually. As I'm lazy, this never happens, and I end
up not being adequately informed for the rest of the day.

Now, being a good liberal citizen, I spent a half hour about 6 months ago
coming up with a solution using Python, my now-favorite programming language.
Basically, instead of my crontab looking like the above, it now calls a script
called kqedKeepAlive.py at 5 am, and another script called kqedKeepAliveKill.py
at 7 pm. Here is my crontab:


	# have bob edwards wake us up in the morning:
	01 05 * * 0-6 /home/pmcnett/pm-sc/pkm/kqedKeepAlive.py

	# turn off the kqed keepalive after 7pm:
	01 19 * * 0-6 /home/pmcnett/pm-sc/pkm/kqedKeepAliveKill.py


kqedKeepAlive will make sure kqed is always playing, and kqedKeepAliveKill will
make sure it will stay dead when I kill it at bedtime.

Anyway, here are the files:

	kqedKeepAlive.py
	kqedKeepAliveKill.py

You will probably have to tweak them to suit your specific needs.

© 2004 Paul McNett       [/Computing/Programming/Python] permanent link

Feel free to link to a story by using the 'permanent link' feature. Please do not reprint a substantial part of a story without permission. Please make sure to have some fun every day, because time keeps on ticking away.