Mercurial > hg > audio-features-catalogue
view fca/writeFCA.py @ 18:d5012016bf64 tip
added rdfpy and rdfonto directories
author | nothing@tehis.net |
---|---|
date | Tue, 23 Apr 2013 11:49:20 +0100 |
parents | 62d2c72e4223 |
children |
line wrap: on
line source
def writeCTX( path, matrix, cols, rows ): ctx = "B\n\n" + len(rows) + "\n" + len(cols) + "\n\n" for it in columns: ctx += it + "\n" for it in columns: ctx += it + "\n" ctx += "\n" for i in range(len(rows)): for j in range(len(columns)): if matrix[i][j] == 1: ctx += "X" else: html += "." html += "\n" if path != '': file = open(path, 'w') file.write(ctx) file.close() return ctx