__init__.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:common-utils 作者: mechaphish 项目源码 文件源码
def create_temp_dir(self):
        """
        Create a temp directory.
        :return: Directory name of the created temp directory.
        """
        dir_name = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(16))
        dir_name = os.path.join("/tmp", dir_name)
        self.run_command('rm -rf ' + str(dir_name))
        self.run_command('mkdir -p ' + str(dir_name))
        return dir_name
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号