update pydemo script