From 8041b5f154165bde2de6827bbd71f84326247cd5 Mon Sep 17 00:00:00 2001 From: Victor Hugo Panisa Date: Wed, 22 Jul 2015 20:40:31 -0300 Subject: [PATCH] Added python compiler --- bin/gpyc.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bin/gpyc.py diff --git a/bin/gpyc.py b/bin/gpyc.py new file mode 100644 index 0000000..1529f3d --- /dev/null +++ b/bin/gpyc.py @@ -0,0 +1,17 @@ +#!/usr/pkg/bin/python2.7 +from __future__ import print_function + +import sys +import py_compile + +def main(argv): + + if len(argv) != 2: + print('Usage: ./gpyc.py ') + return + + file = argv[1] + py_compile.compile(file) + +if __name__ == '__main__': + main(sys.argv) \ No newline at end of file