I haven't used urlparse before, but is there another way to reference the params element besides the [4] index. It's not very readable. Can you do urlparse(path).params instead?