using text file to get ip address from hostname
Terry Reedy
tjreedy at udel.edu
Wed Sep 12 17:04:52 EDT 2012
More information about the Python-list mailing list
Wed Sep 12 17:04:52 EDT 2012
- Previous message (by thread): using text file to get ip address from hostname
- Next message (by thread): using text file to get ip address from hostname
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/12/2012 10:41 AM, dkatorza at gmail.com wrote: > it's not really homework, i found a lab exercise on the web > and i;m trying to study with it. maybe not the most efficient way. > > i have a file with hostnames ordered line by line. Key fact for this exercise: open files are iterable. So your top level structure is... for line in open(<hostname file>): <process hostname in line> -- Terry Jan Reedy
- Previous message (by thread): using text file to get ip address from hostname
- Next message (by thread): using text file to get ip address from hostname
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list