Category Archives: General

Addicted to http data

Addicted to http data

I got into work today and I could not get access to the internet. I was flumuxed. What am I meant to do now. I knew I had plenty to do that didn’t need net access but the first thing I do when I get in is check my mail, check digg and check some of my feeds. I felt utterly lost. Does anybody else feel like this when their net connection goes down.

Server not found

I can’t remember having this kind of dependency when I was on dial-up (dial-up, hi hi…. what fools we were :))

Thankfully downtime was limited to 19 minutes but still, it was touch and go for a while there.

Update:
Look slike there is a clinical (kind of) name for this – Hyperconnectia

LibXML2 and LibXSLT documentation

If you use libxml2 and libxslt (windows binaries) in python, you’ll know how annoying it is trying to figure out how to do something as the documentation is quite limited.

You can find out what is available in the python shell using dir() and __doc__ and help() but that’s a pain so I wrote a script to output a HTML file with the complete listing of the methods and prperties that libxml2 and libxslt have. Run it on your machine and you’ll have a ful list of all the methods (with __doc__ output) available with a permalink to each one and a link to google searching for references to that method.

Hope it helps

Bobby Super Dog

After much persuasion and torture, we are now the proud parents of “Bobby”, An 8 week old golden labrador. He is sleeping at my feet as I type. He does wake and start barking incredibly early but fingers crossed that will end soon. He’s only 8 weeks but already I have hime sitting, giving paw, playing football and pissing and pooping everywhere he sees fit (Gill taught him that).
Bobby Super Dog

Clean up CVS and SVN directories

A quick python script to clean up a “used to be” cvs or svn working directory – I know that TortoiseSVN has an export feature but TortoiseCVS does not.
[code lang=”python”]
“””
Removes all cvs and svn directories
usage: “CVSSVNCleanup.py true” to delete all cvs and svn directories
“CVSSVNCleanup.py” to view all cvs and svn directories
“””

import os
import shutil
import sys

#get a list of all the root level directories
lDirs=os.listdir(os.curdir)

if len(sys.argv) > 1 and sys.argv[1].lower()==”true”:
delete = True
else:
delete = False

for d in lDirs:
for root,dirs,files in os.walk(d):

for dirName in dirs:
if dirName.lower() == “.svn” or dirName.lower() == “cvs”:
curDir = os.getcwd()+”\\”+root+”\\”+dirName
if delete == True:
shutil.rmtree(curDir)
curDir = curDir + ” – Deleted”
print curDir
continue
print “Finished”
[/code]