消息 [146616]
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:51 | rosslagerwall | 修改 | recipients:
+ rosslagerwall, terry.reedy, amaury.forgeotdarc, pitrou, vstinner, nadeem.vawda, ned.deily, eric.araujo, Arfrever, neologix |
| 2011-10-29 18:33:51 | rosslagerwall | 修改 | messageid: <1319913231.7.0.462773799141.issue12797@psf.upfronthosting.co.za> |
| 2011-10-29 18:33:51 | rosslagerwall | 链接 | issue12797 messages |
| 2011-10-29 18:33:50 | rosslagerwall | 创建 | |
|