A python nshell generator