Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '21,': 0.07; 'column': 0.07; 'escape': 0.07; 'cursor': 0.09; 'sep': 0.09; 'subject:python': 0.11; ':-)': 0.13; 'weird': 0.15; '"move': 0.16; 'clears': 0.16; 'coordinates': 0.16; 'row': 0.16; 'string': 0.17; 'wrote:': 0.17; 'header:In-Reply-To:1': 0.25; 'looks': 0.26; 'am,': 0.27; 'executing': 0.27; 'message-id:@mail.gmail.com': 0.27; 'optional': 0.29; 'probably': 0.29; 'fri,': 0.30; 'code': 0.31; 'could': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'returning': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'subject:with': 0.36; 'should': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'email addr:gmail.com': 0.63; 'otten': 0.84; 'us?': 0.91 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 :content-type:content-transfer-encoding; bh=UGguP4cNQotwCtapl+dRJFNRhohHjCZiEMUeKj+bDzk=; b=ejTm2bgbuBsmWIvOYv+JT4KvNYxQaxX2s7vABhWgwzw2EwmQu4hhmtGfs6hdkGJ1gY 762pyfpVHJun2k0V0I6gQiF+aeDUYvn/dFvF0/dddm7e6e304qU8M5pGNBp7/A8OZK7E RsIXjBpncX/4rhvx2LmsnhfOkQsaKn/vLHsCgE37nlmsb353R/2MDOdTeMtE32wK4Fz4 LLLX/zGYxnkZmrCV3wytGZ2BdmfPjMmheLJ4Oxvs03eIyzNiRj7c2OjEPdqk8wxJDf5m swTED4KaTZq5Ct3wCgm9XBtDcUjvPM95O2XGDnidBMnsoKz8+cu7ozhnjP0CG67TrJZD xfQA== MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Fri, 21 Sep 2012 11:32:20 -0600 Subject: Re: how to do draw pattern with python? To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348248772 news.xs4all.nl 6866 [2001:888:2000:d::a6]:47607 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29658 On Fri, Sep 21, 2012 at 10:50 AM, Ismael Farf=E1n wro= te: > 2012/9/21 Peter Otten <__peter__@web.de>: >> echo.hping@gmail.com wrote: >> >> print "\x1b[2J\x1b[0;0H" # optional > > Nice code : ) > > Could you dissect that weird string for us? > > It isn't returning the cursor to (0,0), it's just like executing > clear(1), and looks like those line coloring scape sequences for bash. They're called "ANSI escape codes". :-) CSI 2J clears the screen. CSI 0;0H means "move the cursor to row 0, column 0". However, I don't think that's valid ANSI, as the coordinates are 1-based. Probably it should have been "\x1b[2J\x1b[1;1H".