OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import shlex | 7 import shlex |
8 import sys | 8 import sys |
9 | 9 |
10 # Trim quotes | 10 # Trim quotes |
11 sys.argv[1], = shlex.split(sys.argv[1]) | 11 sys.argv[1], = shlex.split(sys.argv[1].replace('\\', '\\\\')) |
scottmg
2012/08/09 18:18:49
Is the shlex even necessary? "Trim quotes" isn't v
| |
12 | 12 |
13 f = open(sys.argv[1], 'w+') | 13 f = open(sys.argv[1], 'w+') |
14 f.write('Hello from touch.py\n') | 14 f.write('Hello from touch.py\n') |
15 f.close() | 15 f.close() |
OLD | NEW |