some python utils used