Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #12239
| Date | 2011-08-26 15:02 -0400 |
|---|---|
| From | "D'Arcy J.M. Cain" <darcy@druid.net> |
| Subject | Re: Record seperator |
| References | <slrnj5fo7u.4ra.greymausg@hmaus.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.451.1314385354.27778.python-list@python.org> (permalink) |
On 26 Aug 2011 18:39:07 GMT
greymaus <greymausg@mail.com> wrote:
>
> Is there an equivelent for the AWK RS in Python?
>
>
> as in RS='\n\n'
> will seperate a file at two blank line intervals
open("file.txt").read().split("\n\n")
--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Record seperator greymaus <greymausg@mail.com> - 2011-08-26 18:39 +0000
Re: Record seperator "D'Arcy J.M. Cain" <darcy@druid.net> - 2011-08-26 15:02 -0400
Re: Record seperator greymaus <greymausg@mail.com> - 2011-08-27 16:59 +0000
Re: Record seperator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-28 03:24 +1000
Re: Record seperator Roy Smith <roy@panix.com> - 2011-08-27 13:45 -0400
Re: Record seperator ChasBrown <cbrown@cbrownsystems.com> - 2011-08-27 11:40 -0700
Re: Record seperator Terry Reedy <tjreedy@udel.edu> - 2011-08-27 16:03 -0400
Re: Record seperator Roy Smith <roy@panix.com> - 2011-08-27 17:07 -0400
Re: Record seperator Terry Reedy <tjreedy@udel.edu> - 2011-08-27 20:55 -0400
Re: Record seperator Chris Angelico <rosuav@gmail.com> - 2011-08-28 06:07 +1000
Re: Record seperator greymaus <greymausg@mail.com> - 2011-08-28 10:03 +0000
csiph-web