Re: [Tutor] Changing what you've already printed

2005-06-24 Thread Kent Johnson
Ed Singleton wrote: > Is it possible (and easy) to change something you've already printed > rather than print again? > > Any clues or pointers to documentation gratefully recieved. You might like textui. It creates a console window in Tkinter so it is portable and it supports gotoxy(). http://

Re: [Tutor] Changing what you've already printed

2005-06-23 Thread Alan G
> > Curses comes as standard on linux... > > > > More seriously, I seem to recall that on the contrary, the > Windows Python distribution does not include the curses module That's correct. > have to use msvcrt[?] instead). I wonder why, because I'm pretty sure > I saw (C) curses-based applic

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Max Noel
On Jun 23, 2005, at 01:04, Alan G wrote: Curses comes as standard on linux... They also do on Windows. Just listen to any user when the bloody thing crashes. (sorry, couldn't resist :p ) More seriously, I seem to recall that on the contrary, the Windows Python distribution do

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Danny Yoo
On Wed, 22 Jun 2005, Ed Singleton wrote: > Yeah I think curses looks like it will do what I want. It doesn't > look particularly easy to use (the [y,x] format is going to trip me up > a lot) but I think I could write myself a simple interface to it that > would make it simpler for me to use. H

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Alan G
> BTW, if you happen to need this while drawing only a single line, the > "\r" char gets you at the beginning of the current line ! And '\h' should delete back one char. Between the two techniques you can control a single line, but not, sadly, a noughts and crosses board! Alan G. ___

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Alan G
> Is it possible (and easy) to change something you've already printed > rather than print again? Its possible. How easy depends on where you are printing. Using curses in a character based terminal its easy, just define the window within the screen that you want to change. Similarly any GUI too

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Ed Singleton
Yeah I think curses looks like it will do what I want. It doesn't look particularly easy to use (the [y,x] format is going to trip me up a lot) but I think I could write myself a simple interface to it that would make it simpler for me to use. Pierre's '/r' char thing isn't enough for what I want

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Wolfram Kraus
Curses might help you: http://docs.python.org/lib/module-curses.html Take a look at the Demo-directory which is included in the Python source-package. There is a curses subdir in it which might get you started. HTH, Wolfram Ed Singleton wrote: > Is it possible (and easy) to change something you

Re: [Tutor] Changing what you've already printed

2005-06-22 Thread Pierre Barbier de Reuille
Well, it is certainly possible. First, the hard way: you use the ANSI termainal control commands (you can find the reference on the web, or if you need it I can send you an HTML file containing them). Second, the better way: you can use the ncurse library (via the curses Python module). There you'l

[Tutor] Changing what you've already printed

2005-06-22 Thread Ed Singleton
Is it possible (and easy) to change something you've already printed rather than print again? For example, if I'm making a little noughts and crosses game and I print the board: | | | | ___|___|___ | | | | ___|___|___ | | | | | | Then the c