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://
> > 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
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
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
> 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.
___
> 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
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
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
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
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
10 matches
Mail list logo