make python more general