You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Scott Nottingham (JIRA)" <ji...@apache.org> on 2014/07/09 16:17:05 UTC

[jira] [Commented] (AVRO-1286) Python script avro cat should be able to read from stdin

    [ https://issues.apache.org/jira/browse/AVRO-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14056277#comment-14056277 ] 

Scott Nottingham commented on AVRO-1286:
----------------------------------------

What you are trying to do can be easily accomplished as follows:
import cStringIO
file_like_obj = cStringIO.StringIO()
file_like_obj.write(sys.stdin.read())
file_like_obj.seek(0)

now you can pass this file_like_obj into avro's read method.

> Python script avro cat should be able to read from stdin
> --------------------------------------------------------
>
>                 Key: AVRO-1286
>                 URL: https://issues.apache.org/jira/browse/AVRO-1286
>             Project: Avro
>          Issue Type: Bug
>          Components: python
>            Reporter: Uri Laserson
>            Priority: Minor
>
> Currently, you have to specify a target file on the command line.  But it would be nice to be able to stream data through avro cat.



--
This message was sent by Atlassian JIRA
(v6.2#6252)