forked from inglesp/munger.py
-
Notifications
You must be signed in to change notification settings - Fork 0
asimihsan/munger.py
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
### # munger.py - version 0.0.1 ## # a dead simple library for munging text streams; a pythonic answer to grep, sed # and friends. # # convert a file's line endings: # >>> Munger.open('/path/to/file').substitute(r"\r$", "").write() # # watch access logs for 404s: # >>> m = munger.Munger.tail('access_log') # >>> m.split().keep_if_field_matches(8, '404').field(6).display() # # find number of words containing "abc": # >>> Munger.open('/usr/share/dict/words').keep_if_contains('abc').count() # # see modest test suite in munger_test.py for more basic examples of use. # # heavily inspired by Generator Tricks for Systems Programmers -- see # http://dabeaz.com/generators.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published