我们从Python开源项目中,提取了以下48个代码示例,用于说明如何使用setuptools.py27compat.rmtree_safe()。
def _tmpdir(self): tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) try: # cast to str as workaround for #709 and #710 and #712 yield str(tmpdir) finally: os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))