> - time = str(sample.time) > + time = sample.time > stack = sample.stack > sites = ['\1'.join([s.path, str(s.lineno), s.function]) > for s in stack] > - file.write("%s\0%s\n" % (time, '\0'.join(sites))) > + file.write("%d\0%s\n" % (time, '\0'.join(sites))) I guess `time` is a floating-point value. `b"%r"` can be used in which case.