Jun-30-2018, 11:42 PM
My speculation is that '\nEND' is part of one of your variables since you provided incomplete code.
See the following code example:
Lewis
See the following code example:
# write log entry output = "uuuuu" f = open("aaa.txt","a") f.write("\n" + "xxx " + str(output[-1])) f.close() print "wrote log"
Output:xxx u
xxx u
xxx u
xxx u
When you have a problem like this, one of the easiest ways to solve the problem is to start with something that is known to work, and then start adding additional items one at a time. Don't be afraid to write lots of extra things either to the log file or the the screen with a 'print' statement as debugging/diagnostic tools.Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00