summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/external-cross-compile/src/tochar.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/external-cross-compile/src/tochar.py')
-rw-r--r--third_party/python/gyp/test/external-cross-compile/src/tochar.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/external-cross-compile/src/tochar.py b/third_party/python/gyp/test/external-cross-compile/src/tochar.py
new file mode 100644
index 0000000000..c0780d984f
--- /dev/null
+++ b/third_party/python/gyp/test/external-cross-compile/src/tochar.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import sys
+
+src = open(sys.argv[1])
+dst = open(sys.argv[2], 'w')
+for ch in src.read():
+ dst.write('%d,\n' % ord(ch))
+src.close()
+dst.close()