00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 file = open("cyberglovetoshadowhand.map")
00019
00020 first = True
00021 matrix = []
00022
00023 for line in file.readlines():
00024 if first:
00025 first = False
00026 continue
00027 else:
00028 line = line.strip("\n")
00029 line = line.split(" ")
00030 matrix.append(line)
00031
00032 file.close()
00033
00034 matrix_t = []
00035
00036 for i in range(0, len(matrix[0])):
00037 matrix_t.append(range(0,len(matrix)))
00038
00039 for i in range(0, len(matrix)):
00040 for j in range(0, len(line)):
00041 matrix_t[j][i] = matrix[i][j]
00042
00043 file = open("cyberglovetoshadowhand_transposed.map", "w")
00044 for line in matrix_t:
00045 for col in line:
00046 file.write(col+ " ")
00047 file.write("\n")
00048 file.close()
00049
00050
00051