Access all classes in a directory, put into an array, and print them out

Alex new_name at mit.edu
Wed Jul 4 17:10:44 CEST 2001


Yeah, that's roughly what I have in my add_builtins.py:

def iterate(sequence):

    '''Use as
    
    for elt_idx, elt in iterate(sequence): do_stuff()'''
    
    return zip(range(len(sequence)), sequence)

Builtins.iterate = iterate

Alex.



More information about the Python-list mailing list