Adding a Python version of TOSearch