how could change backcolor of console?

W

wanpor

Hi,everyone: I am a c programmer,and want using Python instead of C
I can change backcolor using C,like this:

¡¡textbackground(color);

How can I do in Python?


Best regards





µã »÷ ´Ë ´¦£¡Ãâ ·Ñ ÊÔ Íæ 07 Äê ×î ÊÜ ÆÚ ´ý µÄ ÓÎ Ï· ´ó ×÷ £¡
 
B

buffi

Hi,everyone: I am a c programmer,and want using Python instead of C
I can change backcolor using C,like this:

textbackground(color);

How can I do in Python?

Best regards

µã »÷ ´Ë ´¦£¡Ãâ ·Ñ ÊÔ Íæ 07 Äê ×î ÊÜ ÆÚ ´ý µÄ ÓÎ Ï· ´ó ×÷ £¡

textbackground() is not part of the C programming language but rather
a part of an rather old module for msdos.
http://en.wikipedia.org/wiki/Conio.h

If you want terminal colors in python you can use the curses module
but I doubt that it will work in windows.
http://docs.python.org/lib/module-curses.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top