On 2009-02-06 23:25, Antoine Pitrou wrote:
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
>> It's ok to bump this to Python 2.3, though :-)
>
> The current version only works with 3.x, due to the use of the print
> function with the "end" keyword argument.
> Should it be fixed?
If possible, pybench should work unchanged in both Python 2.x and 3.x.
If the only change needed for this is a new print function, then
it's better to replace all print function calls with a new
helper function:
def print3(*args, end='\r'):
sys.stdout.write(' '.join(*args))
sys.stdout.write(end)
sys.stdout.flush()
(untested, but the idea should be clear) |