def get_text_from_s3(s3_connection, path):
 (bucket_name, key_name) = _from_path(path)
 bucket = s3_connection.get_bucket(bucket_name)
 k = boto.s3.Key(bucket)
 k.key = key_name
 txt = k.get_contents_as_string()
 return txt

def get_text_from_s3 ( s3_connection , path ) : ( bucket_name , key_name ) = _from_path ( path ) bucket = s3_connection . get_bucket ( bucket_name ) k = boto . s3 . Key ( bucket ) k . key = key_name txt = k . get_contents_as_string ( ) return txt
read a file from s3 and return it as text .