OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client 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 import subprocess | 6 import subprocess |
7 import sys | 7 import sys |
8 | 8 |
9 for line in sys.stdin: | 9 for line in sys.stdin: |
10 if line.startswith('SF:'): | 10 if line.startswith('SF:'): |
11 filename = line[3:].strip() | 11 filename = line[3:].strip() |
12 p = subprocess.Popen(['cygpath', filename], stdout=subprocess.PIPE) | 12 p = subprocess.Popen(['cygpath', filename], stdout=subprocess.PIPE) |
13 (p_stdout, _) = p.communicate() | 13 (p_stdout, _) = p.communicate() |
14 print 'SF:' + p_stdout.strip() | 14 print 'SF:' + p_stdout.strip() |
15 else: | 15 else: |
16 print line.strip() | 16 print line.strip() |
OLD | NEW |