def clientServerUploadOptions(self, options, input=None, transmitname=None, server_kwargs=None):
    'Fire up a client and a server and do an upload.'
    root = '/tmp'
    home = os.path.dirname(os.path.abspath(__file__))
    filename = '640KBFILE'
    input_path = os.path.join(home, filename)
    if (not input):
        input = input_path
    if transmitname:
        filename = transmitname
    server_kwargs = (server_kwargs or {})
    server = tftpy.TftpServer(root, **server_kwargs)
    client = tftpy.TftpClient('localhost', 20001, options)
    child_pid = os.fork()
    if child_pid:
        try:
            time.sleep(1)
            client.upload(filename, input)
        finally:
            os.kill(child_pid, 15)
            os.waitpid(child_pid, 0)
    else:
        server.listen('localhost', 20001)
Fire up a client and a server and do an upload.
def clientServerUploadOptions(self, options, input=None, transmitname=None, server_kwargs=None):
    
    root = '/tmp'
    home = os.path.dirname(os.path.abspath(__file__))
    filename = '640KBFILE'
    input_path = os.path.join(home, filename)
    if (not input):
        input = input_path
    if transmitname:
        filename = transmitname
    server_kwargs = (server_kwargs or {})
    server = tftpy.TftpServer(root, **server_kwargs)
    client = tftpy.TftpClient('localhost', 20001, options)
    child_pid = os.fork()
    if child_pid:
        try:
            time.sleep(1)
            client.upload(filename, input)
        finally:
            os.kill(child_pid, 15)
            os.waitpid(child_pid, 0)
    else:
        server.listen('localhost', 20001)