Write a python or shell script when its executed inside a directory it should convert all python .py files inside the current directory and all its subdirectories into .pyc and remove all .py files
For eg:
base(dir)
- init.py
- lib(dir)
- base.py
- lib.py
- doc
- doc.py
- __init__.py
Output:
base(dir)
- init.pyc
- lib(dir)
- base.pyc
- lib.pyc
- doc
- doc.pyc
- __init__.pyc