ptempfile.py 文件源码

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

项目:zing 作者: evernote 项目源码 文件源码
def mkstemp(*args, **kwargs):
    """Wrap tempfile.mkstemp, setting the permissions of the created temporary
    file as specified in settings (see bug 1983).
    """
    fd, name = tempfile.mkstemp(*args, **kwargs)
    if hasattr(os, 'fchmod'):
        os.fchmod(fd, settings.POOTLE_SYNC_FILE_MODE)
    else:
        os.chmod(name, settings.POOTLE_SYNC_FILE_MODE)
    return fd, name
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号