OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import select |
| 6 import sys |
| 7 |
| 8 |
| 9 def PrintMessage(heading, eol='\n'): |
| 10 sys.stdout.write('%s%s' % (heading, eol)) |
| 11 sys.stdout.flush() |
| 12 |
| 13 |
| 14 def WaitForEnter(timeout): |
| 15 select.select([sys.stdin], [], [], timeout) |
| 16 |
| 17 |
| 18 def EnableTestMode(): |
| 19 def NoOp(*_, **__): |
| 20 pass |
| 21 # pylint: disable=W0601 |
| 22 global PrintMessage |
| 23 global WaitForEnter |
| 24 PrintMessage = NoOp |
| 25 WaitForEnter = NoOp |
OLD | NEW |