grep from STDIN python

Hello everyone,
I have been trying to grep certain lines out of STDIN. Basically this is a little app that email is piped to. It works fine, the onlt thing is I get the whole email. I need only to strip out from and subject. Here is what I have so far
#!/usr/bin/python

Why not use Python to strip out the pieces you need? Here's a full working example (with an example email hard-coded for testing purposes):
import wx
import sys
import os
import re
def get_subject_and_from(email_text):

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Less strange, but still introduction
This introduction was added (1st August, 2011) to reflect some reactions. Firstly, the term basics in the title of the article... As any other word, it is a symbol with meaning attached to the word by some a…

Sequence is something that used to store data in it in very simple words. Let us just create a list first.
To create a list first of all we need to give a name to our list which I have taken as “COURSE” followed by equals sign and finally enclosed …

Learn the basics of strings in Python: declaration, operations, indices, and slicing.
Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…

Learn the basics of if, else, and elif statements in Python 2.7.
Use "if" statements to test a specified condition.:
The structure of an if statement is as follows:
(CODE)
Use "else" statements to allow the execution of an alternative, if the …