Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
 def os_getcwd_oofakeimpl():
     return OOSupport.to_rstr(os.getcwd())
Пример #4
0
 def os_access_oofakeimpl(path, mode):
     return os.access(OOSupport.from_rstr(path), mode)
Пример #5
0
 def os_write_oofakeimpl(fd, data):
     return os.write(fd, OOSupport.from_rstr(data))
Пример #6
0
 def os_read_oofakeimpl(fd, count):
     return OOSupport.to_rstr(os.read(fd, count))
Пример #7
0
 def unicode_to_ll(self, u):
     from pypy.rpython.module.support import OOSupport
     return OOSupport.to_runicode(u)
Пример #8
0
 def string_to_ll(self, s):
     from pypy.rpython.module.support import OOSupport        
     return OOSupport.to_rstr(s)
Пример #9
0
 def unicode_to_ll(self, u):
     from pypy.rpython.module.support import OOSupport
     return OOSupport.to_runicode(u)
Пример #10
0
 def string_to_ll(self, s):
     from pypy.rpython.module.support import OOSupport
     return OOSupport.to_rstr(s)