''' Purpose: read a student haiku off the web by making use of module url.py ''' # need help to get web data - so import some capabilities from a local module import url # define the base folder for course participants BASE_PEOPLE_URL = 'http://www.cs.virginia.edu/~cs1112/people/' # get computing id of into canonical form; reply = input( 'Enter computing id: ' ) id = reply.strip() id = id.lower() # specify web folder of classmate folder = BASE_PEOPLE_URL + id + '/' # specify link for their haiku web_file = folder + 'poem.txt' # get the haiku haiku = url.get_contents( web_file ) # print the haiku print( haiku )