def gethostname(space): """gethostname() -> string Return the current host name. """ try: res = rsocket.gethostname() except SocketError, e: raise converted_error(space, e)
def gethostname(space): """gethostname() -> string Return the current host name. """ try: GIL = space.threadlocals.getGIL() if GIL is not None: GIL.release() try: res = rsocket.gethostname() finally: if GIL is not None: GIL.acquire(True) except SocketError, e: raise converted_error(space, e)
def get_hostname(vm): _,_ = vm.decode_args() return Con_String(vm, rsocket.gethostname())