Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'cc:addr:python-list': 0.11; 'windows': 0.15; 'ah,': 0.16; 'bryan': 0.16; 'subject:Lines': 0.16; 'wrote:': 0.18; 'import': 0.22; 'cc:addr:python.org': 0.22; 'skip:l 30': 0.24; 'skip:{ 20': 0.24; 'cc:2**0': 0.24; 'mention': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'pipe': 0.31; 'running': 0.33; 'received:google.com': 0.35; 'to:addr:gmail.com': 0.65; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=vxps7SESnBT6HL7IBfIYxZScYrkC1TES9AEZ/WCdcWg=; b=hZhlE+DJi3jrUfHZglHBsTG2Mjz/L9R1hN9sBMMp6u8E1JPiAkNrkc1HiKMbyAsS7g 5wd14xpgJXmnhwpTT5ncdM8gn5mWQXpLGvt74Y9Rn2PIRJSc3tVO/ghRqJApuZ1gql4j jFHcsKOFC1eL7thRoZn7Xd1oCXLba/eGZgmj4LTdhxmvwf3KVSUNC0gChs/3Pb8wH2C5 lAw/d4wML+t6IDlPhbzvDLhZIvyxIS9JVtYIcuqmj5/C58wUKvpeb8ph2tfxZFeuvNxK s5oHS6v441rLiys0OqLZl6pyAS1xa1uVzv41jUcrkdC7dGSWya9RvYWpvQTEoCt8Selh A/Xg== X-Received: by 10.152.20.40 with SMTP id k8mr379776lae.25.1372192352653; Tue, 25 Jun 2013 13:32:32 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <842bc651-0bed-45df-9a29-2049279f4434@googlegroups.com> References: <0cb638ec-a4bd-4a45-b98c-a7c76996bab7@googlegroups.com> <842bc651-0bed-45df-9a29-2049279f4434@googlegroups.com> From: Joshua Landau Date: Tue, 25 Jun 2013 21:31:52 +0100 Subject: Re: Limit Lines of Output To: Bryan Britten Content-Type: text/plain; charset=UTF-8 Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372192355 news.xs4all.nl 16002 [2001:888:2000:d::a6]:41177 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49187 On 25 June 2013 21:22, Bryan Britten wrote: > Ah, I always forget to mention my OS on these forums. I'm running Windows. Supposedly, Windows has "more" [http://superuser.com/questions/426226/less-or-more-in-windows], For Linux+less; this works: from subprocess import Popen, PIPE less = Popen("less", stdin=PIPE) less.stdin.write(b"\n".join("This is line number {}".format(i).encode("UTF-8") for i in range(1000))) less.wait()