def listicons(icondir=ICONDIR):
 root = Tk()
 import glob
 list = glob.glob(os.path.join(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 ( 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
utility to display the available icons .