python related routine