Created
October 8, 2014 19:46
-
-
Save phobologic/c1ac9a29dd02a9946391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> string = """Namespace Queue Messages | |
... SJHENT Alert_Operation_Router 0 | |
... SJHENT Alert_Process_Router 0 | |
... SJHENT Alert_Service_Restart 0 | |
... SJHENT Alert_Service_Router 0 | |
... SJHENT BadMessageHandler 0 | |
... SJHEDI EMailAlert 0 | |
... SJHENTPMM Ens.Actor 0 | |
... BLAHBLAH WOOTWOOT 501""" | |
>>> lines = string.split('\n') | |
>>> for line in lines: | |
... line = line.strip() | |
... if not line: | |
... continue | |
... parts = line.split() | |
... try: | |
... if int(parts[-1]) > 500: | |
... print line | |
... except ValueError: | |
... continue | |
... | |
BLAHBLAH WOOTWOOT 501 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment