Hi,
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: fdTolFile.writelines("\n\tdiff Not in %s '%' range" %(toleranceInPer)) 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. The errro Im getting is : File "C:\Documents and Settings\\TA-workspace\src\TestAndCompareResults.py", line 840, in __parseDiffTextFile fdTolFile.writelines("\n\tdiff in %s'%' range" %(toleranceInPer)) TypeError: not enough arguments for format string I've also tried this: fdTolFile.writelines("\n\tdiff Not in %s \% range" %(toleranceInPer)) But still I get the same error Thanks and regards, Rajat
-- http://mail.python.org/mailman/listinfo/python-list