Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: webkit/tools/layout_tests/webkitpy/layout_package/metered_stream.py

Issue 545145: Move the layout test scripts into a 'webkitpy' subdirectory in preparation... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: try to de-confuse svn and the try bots Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 Package that implements a stream wrapper that has 'meters' as well as 7 Package that implements a stream wrapper that has 'meters' as well as
8 regular output. A 'meter' is a single line of text that can be erased 8 regular output. A 'meter' is a single line of text that can be erased
9 and rewritten repeatedly, without producing multiple lines of output. It 9 and rewritten repeatedly, without producing multiple lines of output. It
10 can be used to produce effects like progress bars. 10 can be used to produce effects like progress bars.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 # Print the necessary number of backspaces to erase the previous 64 # Print the necessary number of backspaces to erase the previous
65 # message. 65 # message.
66 self._stream.write("\b" * len(self._last_update)) 66 self._stream.write("\b" * len(self._last_update))
67 self._stream.write(str) 67 self._stream.write(str)
68 num_remaining = len(self._last_update) - len(str) 68 num_remaining = len(self._last_update) - len(str)
69 if num_remaining > 0: 69 if num_remaining > 0:
70 self._stream.write(" " * num_remaining + "\b" * num_remaining) 70 self._stream.write(" " * num_remaining + "\b" * num_remaining)
71 self._last_update = str 71 self._last_update = str
72 self._dirty = True 72 self._dirty = True
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698