

def _launch_proxy_server(self, token):
    proxy_path = os.path.join(MainSettings.ROOT, 'proxy')
    deploy_path = os.path.join(proxy_path, 'deploy')
    if os.path.isdir(deploy_path):
        shutil.rmtree(deploy_path)
    os.mkdir(deploy_path)
    params = {
        'token': token,
    }
    templates_path = os.path.join(proxy_path, 'deployment')
    template_names = os.listdir(templates_path)
    templates = {
        
    }
    for name in template_names:
        with open(os.path.join(templates_path, name), 'r') as tf:
            templates[name] = p_file.read()
    for name in template_names:
        with open(os.path.join(deploy_path, name), 'w+') as p_file:
            p_string = fill_template_string(templates[name], params)
            p_file.write(p_string)
        self._create(os.path.join(deploy_path, name))

dataset/ETHPy150Open binder-project/binder/binder/cluster.py KubernetesManager._launch_proxy_server/VarMisuse@140/185 `tf`->`p_file`