Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.083 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.01; 'python?': 0.05; '425': 0.09; 'awk': 0.16; 'seperate': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'voting': 0.18; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'aug': 0.24; 'cc:addr:python.org': 0.30; 'gmt': 0.30; "what's": 0.33; 'there': 0.33; 'charset:us-ascii': 0.36; 'file': 0.36; 'two': 0.37; 'subject:: ': 0.39; 'header:Mime-Version:1': 0.39; 'url:net': 0.60; 'received:208': 0.60; 'skip:o 30': 0.63; 'blank': 0.74; 'democracy': 0.84; 'intervals': 0.84; 'to:addr:mail.com': 0.93 Date: Fri, 26 Aug 2011 15:02:21 -0400 From: "D'Arcy J.M. Cain" To: greymaus Subject: Re: Record seperator In-Reply-To: References: X-Mailer: Claws Mail 3.7.8 (GTK+ 2.24.4; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314385354 news.xs4all.nl 2552 [2001:888:2000:d::a6]:54360 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12239 On 26 Aug 2011 18:39:07 GMT greymaus 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 | 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.