This post originated from an RSS feed registered with Python Buzz
by Ng Pheng Siong.
Original Post: Lisp Scripting
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
import os, string, stat
for d in string.split(os.environ['PATH'], ':'):
for f in os.listdir(d):
mode = os.lstat(d + '/' + f)[stat.ST_MODE]
if not stat.S_ISDIR(mode):
print f
I haven't done any Scheme, actually. I've been scripting with CLISP. Here's a snippet from a backup script I wrote:
Over time, should I write more such scripts, I might conceivably end
up with a little
language specific to system administration. Or I might just switch over to scsh. ;-)