def from_opaque_string(s): if isinstance(s, str): return s elif isinstance(s, ootype._string): return OOSupport.from_rstr(s) else: return LLSupport.from_rstr(s)
def os_getcwd_oofakeimpl(): return OOSupport.to_rstr(os.getcwd())
def os_access_oofakeimpl(path, mode): return os.access(OOSupport.from_rstr(path), mode)
def os_write_oofakeimpl(fd, data): return os.write(fd, OOSupport.from_rstr(data))
def os_read_oofakeimpl(fd, count): return OOSupport.to_rstr(os.read(fd, count))
def unicode_to_ll(self, u): from pypy.rpython.module.support import OOSupport return OOSupport.to_runicode(u)
def string_to_ll(self, s): from pypy.rpython.module.support import OOSupport return OOSupport.to_rstr(s)