Python port of cMonkey (redirect)