index.py
changeset 15 707ddd7a7912
parent 13 a0cb32f3de3d
child 16 9234f5ae765b
equal deleted inserted replaced
14:e30e33081480 15:707ddd7a7912
   129 
   129 
   130     if random_chars :
   130     if random_chars :
   131         chars = randomize(chars)
   131         chars = randomize(chars)
   132     
   132     
   133     for line, char, color in itertools.izip_longest(text, chars, line_colors, fillvalue=None) :
   133     for line, char, color in itertools.izip_longest(text, chars, line_colors, fillvalue=None) :
       
   134         if not line :
       
   135             continue
       
   136 
   134         # pick position to place char
   137         # pick position to place char
   135         pos = random.randint(1, len(line) - 1)
   138         pos = random.randint(1, len(line) - 1)
   136 
   139 
   137         if not color :
   140         if not color :
   138             color = "#000000"
   141             color = "#000000"