Pylint を使用します。
sucmac:~ ajung$ /tmp/bin/pylint ou.py
No config file found, using default configuration
************* Module ou
W: 3,0: Bad indentation. Found 3 spaces, expected 4
W: 5,0: Bad indentation. Found 3 spaces, expected 4
C: 1,0: Missing docstring
C: 1,0: Invalid name "n" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 1,3: Invalid name "dollar" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 1,11: Invalid name "euro" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 1,18: Used builtin function 'map'
W: 1,22: Used builtin function 'input'
E: 3,9: Undefined variable 'dolar'