local hostname hostname is simply the human-readable form of the host address humans don' really understand very well (and the ipv addresses make even less sensehoweverhumans do understand localhost just fine there is special server and setup to translate human-readable hostnames to host addressesbut you really don' need to worry about it for this book (or programming in generalwhen your application suddenly breaks for no apparent reasonit helps to know that one does existthough the "hostsectionearlier in this introduces you to the hostname to certain extent through the use of the socket gethostbyaddr(methodwhereby an address is translated into hostname you saw the process in reverse using the socket gethostbyname(method the following steps help you understand some nuances about working with the hostname open python shell window you see the familiar python prompt type import socket and press enter type socket gethostnameand press enter you see the name of the local systemas shown in figure - the name of your system will likely vary from mineso your output will be different than that shown in figure - but the idea is the same no matter which system you use figure - sometimes you need to know the name of the local system type socket gethostbyname(socket gethostname)and press enter you see the ip address of the local systemas shown in figure - againyour setup is likely different from mineso the output you see will differ this is method you can use in your applications to determine the address of the sender when needed because it doesn' rely on any hard-coded valuethe method works on any system close the python shell