how to get hostname in python code