How to Minify, obfuscate, and compress Python code using- pyminifier
Switch to SU to run all command without using sudo everytime.
sudo su
Install Prerequisites:
apt-get install python-setuptools
easy_install pip
Install Pyminifier:
pip install https://pypi.python.org/packages/source/p/pyminifier/pyminifier-2.1.tar.gz
Check and verify installation:
pyminifier --version
pyminifier --help
Try some basic obfuscation:
pyminifier --obfuscate --gzip yourcode.py