def MatInv(arr,file): f = open('file.txt','w') f.write(arr) f.close()
So I'm trying to write a module that will take a matrix (arr) and write it to a text file. The above module is called MatrixIO.py #first I import it import MatrixIO #Then i call the function MatInv with matrix(a) and file name (doc) as the arguments MatInv(a,doc) It creates a file called txt and it shows only boxes. What am I doing wrong?
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor