python shell methods