Convenience functions for python