Compile py to java class
def compile_dir(directory): import compileall compileall.compile_dir(directory, force=True) def compile_file(file): import py_compile py_compile.compile(file) if __name__ == "__main__": import sys import os if len(sys.argv) < 2: print("Usage: compile.py <file|dir>") if os.path.isdir(sys.argv[1]): compile_dir(sys.argv[1]) else: compile_file(sys.argv[1])
댓글 없음:
댓글 쓰기