Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

Commit

Permalink
Added python compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
wfzyx committed Jul 22, 2015
1 parent 0d6e42d commit 8041b5f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bin/gpyc.py
Original file line number Diff line number Diff line change
@@ -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 <file_to_compile.py>')
return

file = argv[1]
py_compile.compile(file)

if __name__ == '__main__':
main(sys.argv)

0 comments on commit 8041b5f

Please sign in to comment.