Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write frame.description in a text file

Status
Not open for further replies.

Eleo

Mechanical
Joined
Mar 2, 2015
Messages
26
Location
GB
How to write in a text file the following data:
Increment 0: Step Time = 4.2613E-06

Increment 100: Step Time = 4.2613E-04

I used the code:
file.write('%s %d %s %s %6.4f \n '(frame.description[0],
frame.description[1],frame.description[2],frame.description[3],
frame.description[4]))

I have the error message TypeError: ‘str’ object is not callable.
 
I have just used the following code and it is working ok.
file.write('%s \n '%(frame.description))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top