This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 rosslagerwall
收信人 Arfrever, amaury.forgeotdarc, eric.araujo, nadeem.vawda, ned.deily, neologix, pitrou, rosslagerwall, terry.reedy, vstinner
日期 2011-10-29.18:33:50
SpamBayes Score 0.00018982074
Marked as misclassified
Message-id <1319913231.7.0.462773799141.issue12797@psf.upfronthosting.co.za>
In-reply-to
内容
Before I implement it properly, is this the kind of api that's desired?

"""
import os
import io

class MyOpener:
    def __init__(self, dirname):
        self.dirfd = os.open(dirname, os.O_RDONLY)

    def open(self, path, flags, mode):
        return os.openat(self.dirfd, path, flags, mode)

myop = MyOpener("/tmp")
f = open("testfile", "w", opener=myop.open)
f.write("hello")
"""
历史
日期 用户 动作 参数
2011-10-29 18:33:51rosslagerwall修改recipients: + rosslagerwall, terry.reedy, amaury.forgeotdarc, pitrou, vstinner, nadeem.vawda, ned.deily, eric.araujo, Arfrever, neologix
2011-10-29 18:33:51rosslagerwall修改messageid: <1319913231.7.0.462773799141.issue12797@psf.upfronthosting.co.za>
2011-10-29 18:33:51rosslagerwall链接issue12797 messages
2011-10-29 18:33:50rosslagerwall创建