0

I am a beginner from a non programming background. I am using windows OS. Whenever I write a program in Python and run it, it opens in MS Dos with a black colored screen. I just want to change the background and the font color. How can I do that?

CRABOLO
  • 8,495
  • 38
  • 39
  • 67

3 Answers3

1

The Windows command shell is pretty limited, it doesn't support the ANSI color codes that other OSes' shells do. But I found that the colorama module is extremely useful to get colors in Python command line interfaces.

Example from the website linked to above: enter image description here

And here's a colorful Hello World with code and output:

enter image description here

Junuxx
  • 13,645
  • 5
  • 40
  • 68
0

Right click on the title bar of the command prompt. Go to properties. You can change all you want from Font & Color tabs there?

Buddha
  • 4,183
  • 2
  • 26
  • 49
0

For the whole window, http://www.wikihow.com/Change-Colours-in-Command-Prompt

For per-output colour, maybe something from here: How to echo with different colors in the Windows command line

Community
  • 1
  • 1
jozxyqk
  • 15,424
  • 12
  • 80
  • 168