<div dir="ltr">Hi,<br><br><br>I'm using the writelines() method to write some lines to a text file. But I'm unable to write the % character to the file using the following format:<br><br>fdTolFile.writelines("\n\tdiff Not in %s '%' range" %(toleranceInPer))<br>
<br><br>The second % does not get write to the file and Im getting errors. Please suggest what additional information should I give to write the % character.<br><br><br>The errro Im getting is :<br> File "C:\Documents and Settings\\TA-workspace\src\TestAndCompareResults.py", line 840, in __parseDiffTextFile<br>
    fdTolFile.writelines("\n\tdiff in %s'%' range" %(toleranceInPer))<br>TypeError: not enough arguments for format string<br><br><br>I've also tried this:<br><br>fdTolFile.writelines("\n\tdiff Not in %s \% range" %(toleranceInPer))<br>
<br>But still I get the same error<br><br><br>Thanks and regards,<br>Rajat<br>
</div>