shell: refactoring _python clean