Unquote HTML-quoted strings in Python

I wasted a lot of time looking for something in Python to decode (if that is the right word, otherwise, unquote) HTML-quoted strings such as those you get back as form values. Despite using the module “urllib“ to retrieve the form values in the first place, I was not aware of the set of utility functions it offers for quoting and unquoting of values. So, here you go: Look at “unquote()“ and “unquote_plus()“.

SVN: Relocating repository URLs with svn switch –relocate

You are using subversion (svn) for version control for a web-based software project you are doing. Your svn server is hosted on your laptop behind a DSL with a dynamically allocated IP address. You checkout the head revision on a live server one day, make changes in a few files on the server, and try to commit the changes back to the svn server the next day. Hell ensues. You’re doomed.

Not quite. If you have heavily used svn for version control for your projects, chances are good you might have come across such a problem. No? Well, at least, I did. Since my svn repository is on a system that gets assigned a dynamic IP address every time I power up the DSL and since power outages are all too frequent where I live and since I don’t have a backup solution such as UPS save for a generator, I often run into the sort of svn trouble I described above.

The fix? Three words: svn switch –relocate (jump to the last example).

TortoiseSVN has a similar “relocate” button that does the same thing. I wasn’t familiar with the actual svn command it uses behind the scenes until Tili enlightened me.

Of road accidents and humping cars from behind.

I seem to be having a go at humping cars from behind on roads since the past month.

Last month when I rammed my car head straight into another’s, it was not only the car that got hurt, but the ego suffered too. In three years of active driving, I had kept a clean sheet: no accidents, no dents, no bumps, no injured civilians, no broken glasses, no dead cats nor dogs. Last month’s ordeal left my clean running spree to end in a debacle. I admitted it back then and I admit it today: It was wholly my mistake. I wrongfully assumed the car in front would be moving and occupied myself to opening up the wrapper of a mint gum with a single hand and inspecting where exactly from the door next to me that annoying, creaking sound was coming (I do continue to blame the somewhat cranky door and the darned mint gum). By the time I looked up, it was too late. The impact left me to pay for a new headlight and some denting work. My ego took a hard blow as well.

Today’s ordeal simply added fuel to the fire.

I was involved in another innocuous road accident in the late morning today. The car moving at a steady pace in front came to a screeching halt. I suppose I was moving in too close to the car. I missed dropping all weight on the brakes in the nick of time by just a split of a second. Wham. The bumper on the car I humped broke off from one corner and came off hanging just a bit. The part of the chassis of my car that made impact didn’t sustain any damages. No one got hurt: Except my ego.

I drive ruthlessly. I drive carefully. It is only when my mind in a spur of a moment slides off into another dimension that I find myself the recipient of doom.

I am sitting with a cranky look on my face that would ward off anyone approaching from a distance. Sigh

Dead phone line … Dialup … Connection timed out!

Last login: Sun Aug 26 22:38:09 2007 from

ayaz@laptop:$ date
Sun Sep 2 13:12:30 PKT 2007

Woah! That is scary. I hadn’t logged into my Slackware boxen at home in a week. Eek! There had not been a day I had not logged into that box in the last four years. Scary!

Part of the reason I will pitch in to justify the act of unpardonable blasphemey that I’ve committed is the dead phone line which has cut my fast lane access to the Internet off for the past week. I have been coming online from a dial-up connection that would put a whole breed of turtles to shame when it comes to the slowness of speed. Plus, the end of the telephone line where the jack goes into the socket is for god knows what reason glued into its place, and threatens to break off tearing the wire along if pulled. If that isn’t enough trouble already, that wire is only a couple of feet long, serving a telehpone set that rests only a few feet away from the socket. Consequently, I am left with no option save to take my new laptop that only boots Vista yet to within feets of the telephone set, plug in the wire, and get on to the Internet on a wagon to which it would seem a contradiction in terms if it were to be described anyhow as “band”. If only that was the end of my woes, the patch-up cable to the switch cannot stretch that far (at least, not without breaking off).

The phone line is messed up still, and I am without DSL still. I can only hope it gets fixed before the weekend goes to sleep which from the sounds of the pre-snores I can fathom is pretty near.

To all those bastards enjoying fast Internet, curse you!