LogStash Out Filters

I an mew to the ELK stack, but I have an understanding of the how it works. I was attempting to run a python script from my output using the exec command but when I do this I generate an error: Cannot create pipeline {:reason=>"Expected one of #, input, filter, output at line 91, column 1 (byte 2859) after "}

the output send to elasticsearch and I added a line:

exex {
command => " python.py args"
}

is this even possible?

Thanks!

It is possible, but can you post the entire section, it might provide more clues.