init with python code