def get(self, remote, local=None):
if isinstance(local, file_type):  <EOL><INDENT>local_file = local<EOL><DEDENT>elif local is None:  <EOL><INDENT>local_file = buffer_type()<EOL><DEDENT>else:  <EOL><INDENT>local_file = open(local, '<STR_LIT:wb>')<EOL><DEDENT>self.conn.retrbinary("<STR_LIT>" % remote, local_file.write)<EOL>if isinstance(local, file_type):<EOL><INDENT>pass<EOL><DEDENT>elif local is None:<EOL><INDENT>contents = local_file.getvalue()<EOL>local_file.close()<EOL>return contents<EOL><DEDENT>else:<EOL><INDENT>local_file.close()<EOL><DEDENT>return None<EOL>
Gets the file from FTP server

            local can be:
                a file: opened for writing, left open
                a string: path to output file
                None: contents are returned