returns list of urllib file objects

def get_pages():
    '''returns list of urllib file objects'''
    pages =[]
    counter = 1

    print "Checking for themes..."

    while(True):
        page = urllib.urlopen('http://dotshare.it/category/terms/colors/p/%d/' % counter)
        print "Page%d:  %s" % (counter, "OK" if (page.code < 400) else "Fail!")
        if page.code >= 400:
            break
        pages.append(page)
        counter += 1

    print "Found %d pages." % (counter - 1)
    return pages