def writenodeserver(self, nodestr, server):
        ''' Creates a /tmp/pycore.nnnnn/nX.conf/server file having the node
        and server info. This may be used by scripts for accessing nodes on
        other machines, much like local nodes may be accessed via the
        VnodeClient class.
        '''
        (host, port, sock) = self.getserver(server)
        serverstr = "%s %s %s" % (server, host, port)
        name = nodestr.split()[1]
        dirname = os.path.join(self.session.sessiondir, name + ".conf")
        filename = os.path.join(dirname, "server")
        try:
            os.makedirs(dirname)
        except __HOLE__:
            # directory may already exist from previous distributed run
            pass
        try:
            f = open(filename, "w")
            f.write("%s\n%s\n" % (serverstr, nodestr))
            f.close()
            return True
        except Exception, e:
            msg = "Error writing server file '%s'" % filename
            msg += "for node %s:\n%s" % (name, e)
            self.session.warn(msg)
            return False
dataset/ETHPy150Open coreemu/core/daemon/core/broker.py/CoreBroker.writenodeserver