I arrived home last Tuesday afternoon, and the study was awfully quiet.
I go into the kitchen to make a cup of coffee, and the microwave was blinking.
The power had gone out at some time during the day, and it became apparent that
all was not well.
At first I just tried switching the firewall/gateway machine (a very old PC
running Smoothwall off then on again.
That didn't work; then I noticed my main PC was off, but I figured its ATX
power supply had just turned shut down. I tried the power switch,
and again - nothing.
I had that sinking feeling, and had to start digging around under the desk to
check the power board. Sure enough, the surge switch had been tripped. D'oh!
Not good... I switched everything off, reset the surge switch, and tried bringing
up my main machine. Fortunately it booted without hassle.
Not so for the gateway box. I switched it on, and it got almost all the way through
POST, and failed initialising the hard disk controller. Half an hour of fiddling
did not improve the situation, and I eventually had to write it off. I swapped it
with another old drive (that I knew had some bad sectors, but I was kinda desperate)
and got that back up and running.
Then I had the problem of needing to access the net to fix the gateway - while the
gateway was down! I connected my main box to the net, downloaded the latest ISO
for Smoothwall and then plugged the gateway
back in.
The gateway box didn't have a floppy drive, let alone a CD-ROM drive connected (since
it hardly ever needs such things). But I needed at least floppies to do a brand-new
operating system installation... So I mounted the Smoothwall ISO in loopback mode
(I love Linux!) and made boot floppy images. I connected up a spare floppy drive
to the gateway, booted up and started the install. Then Smoothwall wanted the
installation CD. But how do you install off a CD if you don't even have a CD-ROM
drive on the machine?
Not a problem, thanks to Linux. I had already mounted (via loopback) the Smoothwall
CD image on my main PC, so I could access the CD without even physically burning it
to a disc. Now, the Smoothwall boot floppies can do a network-based install. So
after disc 2, I could get the rest via the net using HTTP. But I didn't have a web
server installed. No problem - I just fired up a Python interpreter, and typed a few commands:
>>> import SimpleHTTPServer
>>> SimpleHTTPServer.test()
then - voila! - instant web server!
I then pointed the Smoothwall installer at my new web server, and downloaded the install
image. A short while later, after the installation was complete, I configured the
firewall and I was back online.
Thanks to Linux and Python, I was able to get back up and running far more quickly than
I might have otherwise...

blackout!
That a very ggod stroy. Thank god it wasnt all day and night.
Why python
You could have done this with Perl, of course. There's nothing special about Python.
Why _not_ Python?
Yes, I could have done this with Perl. Or Tcl, or Rebol, or a number of other languages. I just have a preference for Python, and this was a good example of how quick and easy it is to solve things using Python. And of course it is special... :)