SBC python code