def makeCode(self, code):
      """ Create the binary code
      return a string which contains "0" for white bar, "1" for black bar, "L" for long bar """
      
      # Convert code string in integer list
      self.EAN13 = []
      for digit in code:
         self.EAN13.append(int(digit))
         
      # If the code has already a checksum
      if len(self.EAN13) == 13:
         # Verify checksum
         self.verifyChecksum(self.EAN13)
      # If the code has not yet checksum
      elif len(self.EAN13) == 12:
         # Add checksum value
         self.EAN13.append(self.computeChecksum(self.EAN13))
      
      # Get the left codage class
      left = self.family[self.EAN13[0]]
      
      # Add start separator
      strCode = 'L0L'
      
      # Compute the left part of bar code
      for i in range(0,6):
         strCode += left[i][self.EAN13[i+1]]
      
      # Add middle separator 
      strCode += '0L0L0'
      
      # Compute the right codage class
      for i in range (7,13):
         strCode += self.groupC[self.EAN13[i]]
      
      # Add stop separator
      strCode += 'L0L'
      
      return strCode
 Create the binary code
      return a string which contains "0" for white bar, "1" for black bar, "L" for long bar 
recipes/Python/426069_EAN_Bar_code_image_generator/recipe-426069.py