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,605
  • 39
  • 41
  • 68

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
  • 14,011
  • 5
  • 41
  • 71
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,339
  • 2
  • 27
  • 51
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
  • 16,424
  • 12
  • 91
  • 180