Granting access in Python