Re: sed equivalent of something easy in python

2010-10-27 Thread Tim Chase
On 10/27/10 08:27, Martin Gregorie wrote: (2) made me take care of 2 files instead of 1 from now on. Not necessarily: $ cat heredoc.sh #!/usr/bin/env bash python<< 'EOF' print "hello world" def foo(): print "foo()" foo() EOF $ Or even better: $ cat hello #!/usr/bin/python print "hello

Re: sed equivalent of something easy in python

2010-10-27 Thread Martin Gregorie
On Wed, 27 Oct 2010 03:28:16 -0700, Lie wrote: > On Oct 26, 4:04 am, Daniel Fetchinson wrote: > >> (2) made me take care of 2 files instead of 1 from now on. > > Not necessarily: > > $ cat heredoc.sh > #!/usr/bin/env bash > python << 'EOF' > print "hello world" > def foo(): > print "foo()"

Re: sed equivalent of something easy in python

2010-10-27 Thread Lie
On Oct 26, 4:04 am, Daniel Fetchinson wrote: > (2) made me take care of 2 files instead of 1 from now on. Not necessarily: $ cat heredoc.sh #!/usr/bin/env bash python << 'EOF' print "hello world" def foo(): print "foo()" foo() EOF $ $ ./heredoc.sh hello world foo() -- http://mail.python.or