Cleanup python cart.
Merge pull request #2090 from mrunalp/dev/python_cleanup

Cleanup python cart.