Python convenience function for opening compressed URLs and files.