<s> import tftpy <EOL> def read_tftp ( server , remote_filename , port = <NUM_LIT> ) : <EOL> client = tftpy . TftpClient ( server , port ) <EOL> fake_file = FakeFile ( ) <EOL> client . download ( remote_filename , fake_file ) <EOL> return fake_file . content <EOL> class FakeFile ( object ) : <EOL> def __init__ ( self ) : <EOL> self . content = "<STR_LIT>" <EOL> self . closed = True <EOL> def write ( self , data ) : <EOL> self . content += data </s>
