[Tutor] Changing what you've already printed
Wolfram Kraus
kraus at hagen-partner.de
Wed Jun 22 15:33:02 CEST 2005
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'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 computer has it's go, and rather than print the board out
> again and have the previous empty board appear higher up, I want to
> just add a X to the board I've already created.
>
> Eg.
>
>
> | |
> | |
> ___|___|___
> | |
> | X |
> ___|___|___
> | |
> | |
> | |
>
> I've programs do this on the command line in Linux, so I assume it
> must be possible. (I don't mind making my programs Linux only so
> that's not a problem).
>
> Any clues or pointers to documentation gratefully recieved.
>
> Thanks
>
> Ed
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list