def main():
    acad = Autocad()
    objects = None
    if 'i' in sys.argv[1:]:
        objects = acad.get_selection('Select objects')
    lamps = defaultdict(int)
    for lamp in iter_lamps(acad, objects):
        lamps[lamp.mark] += int(lamp.number)
    print '-' * 79
    for mark, number in sorted(lamps.iteritems()):
        print '%-20s | %s' % (mark, number)