Author rosslagerwall
Recipients Arfrever, amaury.forgeotdarc, eric.araujo, nadeem.vawda, ned.deily, neologix, pitrou, rosslagerwall, terry.reedy, vstinner
Date 2011-10-29.18:33:50
SpamBayes Score 0.000189821
Marked as misclassified No
Message-id <1319913231.7.0.462773799141.issue12797@psf.upfronthosting.co.za>
In-reply-to
Content
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")
"""
History
Date User Action Args
2011-10-29 18:33:51rosslagerwallsetrecipients: + rosslagerwall, terry.reedy, amaury.forgeotdarc, pitrou, vstinner, nadeem.vawda, ned.deily, eric.araujo, Arfrever, neologix
2011-10-29 18:33:51rosslagerwallsetmessageid: <1319913231.7.0.462773799141.issue12797@psf.upfronthosting.co.za>
2011-10-29 18:33:51rosslagerwalllinkissue12797 messages
2011-10-29 18:33:50rosslagerwallcreate