Better implementation of enter/exit and PS1 setup for python envs.