sed with python

David Raleigh Arnold darnold4 at cox.net
Wed Aug 27 14:16:36 EDT 2003


On Wed, 27 Aug 2003 19:26:36 +0200, U. N. Owen wrote:

> 
> David Raleigh Arnold enlightened us with:
>> How do I use python as a wrapper for sed and/or gawk scripts?
> 
> You don't. Python can do anything sed and awk can, and much, much more.
> 
> Sybren
> 
> 
> 
> That's true, but it may be useful to use existing code (and not bother
> rewriting in Python). You can use shell scripts, pipes, or if you want to
> use only python scripts, use
> os.system to call sed or awk.
> But if you write new functions, Python is enough, as Sybren says

os.system it is.  Thanks!  Some of my stuff is simple substitution
filters, and rewriting that makes no sense to me.  DaveA

-- 
"We have learned the lessons of Viet Nam." --anon Spokesman
"Failure is not an option." --anon Spokesman
Can both be true? n  Are both false? y  Right answers get my vote. 
D. Raleigh Arnold dra@ http://www.openguitar.com  darnold4 at cox.net





More information about the Python-list mailing list