(icondir=ICONDIR)
Utility to display the available icons.
Utility to display the available icons.
Utility to display the available icons .
def listicons(icondir=ICONDIR):
    """Utility to display the available icons."""
    root = Tk()
    import glob
    list = glob.glob(os.path.join(glob.escape(icondir), "*.gif"))
    list.sort()
    images = []
    row = column = 0
    for file in list:
        name = os.path.splitext(os.path.basename(file))[0]
        image = PhotoImage(file=file, master=root)
        images.append(image)
        label = Label(root, image=image, bd=1, relief="raised")
        label.grid(row=row, column=column)
        label = Label(root, text=name)
        label.grid(row=row+1, column=column)
        column = column + 1
        if column >= 10:
            row = row+2
            column = 0
    root.images = images
def listicons ( icondir = ICONDIR ) : root = Tk ( ) import glob list = glob . glob ( os . path . join ( glob . escape ( icondir ) , "*.gif" ) ) list . sort ( ) images = [ ] row = column = 0 for file in list : name = os . path . splitext ( os . path . basename ( file ) ) [ 0 ] image = PhotoImage ( file = file , master = root ) images . append ( image ) label = Label ( root , image = image , bd = 1 , relief = "raised" ) label . grid ( row = row , column = column ) label = Label ( root , text = name ) label . grid ( row = row + 1 , column = column ) column = column + 1 if column >= 10 : row = row + 2 column = 0 root . images = images