November 23rd, 2004, 09:32 AM
Join Date: Oct 2004
Time spent in forums: 3 Days 11 h 45 m 52 sec
Reputation Power: 10
Originally Posted by Swede
I'm a new user of Python and I will be using it for writing scripts to the FEM software ABAQUS.
My problem right now is that I have a binary file with data describing the stressdistribution in a component. I would like to write a python script that reads this file and writes it to a text-file. Is this possible?? And if, how do I start?
If necessery I can provide you with some C-code that reads from this binary file if this helps.
# reading a file
f = open("filename-to-be-read-here", "r")
var = f.read()
# writing the content to another file
f = open("filename-to-write-here", "w")
Unless your question is how to also format the content from a binary into a text file.. which depends on the binary