Loading...

Compile all python programmes in current directory

I have to write some lightweight python programmes for rhel. I was wandering how to compile all python source files (*.py) in a my source directory.

On the console just call the module py_compile and put the asterisk for the list of files to compile

python -m py_compile *.py