How can I get the IP address of eth0 in Python?

When an error occurs in a Python script on Unix , an email is sent. I have been asked to add {Testing Environment} to the subject line of the email if the IP address is 192.168.100.37 which is the