parameters: (filename)
return_statement: return csvcolors
docstring: get colors from csv file and return a list with name and cmyk 255 values
docstring_summary: get colors from csv file and return a list with name and cmyk 255 values
docstring_tokens: get colors from csv file and return a list with name and cmyk 255 values
function: def getColorsFromCsv(filename):
      """get colors from csv file and return a list with name and cmyk 255 values"""
      csvreader=csv.reader(file(filename))
  
      csvcolors=[]
      i=0
      for row in csvreader:
          name=row[0]
          name=name.strip()
          c=int(row[1] )* 2.55
          c=int(c)
          m=int(row[2] )* 2.55
          m=int(m)
          y=int(row[3] )* 2.55
          y=int(y)
          k=int(row[4] )* 2.55
          k=int(k)        
          if checkValue(c, m, y, k) ==False:
              scribus.messageBox("csv2color", "At least one CMYK value in your csv file is not correct \n(must be between 0 and 100)\nAborting script - nothing imported.",  icon=scribus.ICON_WARNING)
              sys.exit()
          else:
              pass
          color=(name, c, m, y, k)
          csvcolors.append(color)
          i=i+1
      return csvcolors
function_tokens: def getColorsFromCsv ( filename ) : csvreader = csv . reader ( file ( filename ) ) csvcolors = [ ] i = 0 for row in csvreader : name = row [ 0 ] name = name . strip ( ) c = int ( row [ 1 ] ) * 2.55 c = int ( c ) m = int ( row [ 2 ] ) * 2.55 m = int ( m ) y = int ( row [ 3 ] ) * 2.55 y = int ( y ) k = int ( row [ 4 ] ) * 2.55 k = int ( k ) if checkValue ( c , m , y , k ) == False : scribus . messageBox ( "csv2color" , "At least one CMYK value in your csv file is not correct \n(must be between 0 and 100)\nAborting script - nothing imported." , icon = scribus . ICON_WARNING ) sys . exit ( ) else : pass color = ( name , c , m , y , k ) csvcolors . append ( color ) i = i + 1 return csvcolors