Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29654
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: how to do draw pattern with python? |
| Date | 2012-09-21 19:29 +0200 |
| Organization | None |
| References | <c35280cc-4b70-4030-b040-bafba2eacdd0@googlegroups.com> <k3htib$g7s$1@ger.gmane.org> <CANXECd5rX5qeXtRNHcAYsGwACjt-RBVFLiEgsjPvE1wsRxa9mg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1022.1348248500.27098.python-list@python.org> (permalink) |
Ismael Farfán wrote: > 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. "\x1b[2J" or ESC [2J should clear the screen and "\x1b[1;1H" or ESC [1;1H should move the cursor to the origin (I got that wrong in the previous post) There may be other problems -- I stopped reading http://en.wikipedia.org/wiki/ANSI_escape_code as soon as I got the desired effect (scrolling) in konsole.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to do draw pattern with python? echo.hping@gmail.com - 2012-09-21 06:36 -0700
Re: how to do draw pattern with python? Laszlo Nagy <gandalf@shopzeus.com> - 2012-09-21 15:54 +0200
Re: how to do draw pattern with python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-21 14:55 +0100
Re: how to do draw pattern with python? Dave Angel <d@davea.name> - 2012-09-21 10:00 -0400
Re: how to do draw pattern with python? Peter Otten <__peter__@web.de> - 2012-09-21 16:29 +0200
Re: how to do draw pattern with python? Ismael Farfán <sulfurfff@gmail.com> - 2012-09-21 11:50 -0500
Re: how to do draw pattern with python? Peter Otten <__peter__@web.de> - 2012-09-21 19:29 +0200
Re: how to do draw pattern with python? Chris Angelico <rosuav@gmail.com> - 2012-09-22 03:31 +1000
Re: how to do draw pattern with python? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-21 11:32 -0600
Re: how to do draw pattern with python? Hans Mulder <hansmu@xs4all.nl> - 2012-09-22 21:34 +0200
Re: how to do draw pattern with python? Chris Angelico <rosuav@gmail.com> - 2012-09-22 03:35 +1000
Re: how to do draw pattern with python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-21 20:55 +0100
Re: how to do draw pattern with python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-21 16:12 -0400
Re: how to do draw pattern with python? Chris Angelico <rosuav@gmail.com> - 2012-09-22 13:08 +1000
csiph-web