Different coloured print strings in python - IDLE

Viewed 1808

I'm using IDLE to just create a short, basic text adventure game. the methods I try work in other editors such as Repl.it or canopy, but I prefer the use of IDLE as I just like the simplicity of it, and that it doesn't require an Internet connection to access.

I won't mention the methods I tried, as I may have just been approaching them in the entirely wrong way, or maybe IDLE just simply doesn't have the functionality of other editors, but I just want to make the text in the game clearer to distinguish. For example, below is a short segment:

import time

print ("Welcome Traveller!") 
time.sleep(1)
def name_identify():
    print () 
    name_input = input ("What is your name? ").lower() 
    name_input = name_input.title() 
    time.sleep(0.75)
    def name_confirm(): 
        print ()
        print ("So %s is your name then?" % name_input)

Where the questions such as

name_input = input ("What is your name? ").lower()

appear in a different colour, or bold/italic even. As things similar to

print ("\x1B[3mHello World\x1B[23m")

and

print ("\033[1;31m""Hello world") 

don't work, I assume this function is not naturally supported, so I ask, if it is possible to either A, make it supported, so this method, or similar work, or B, another option which does make changes at least similar to what I seek?

It would be very helpful if anyone could provide me with a way to do this, or at the very least an editor which is close in simplicity (design wise) to IDLE and does support the functions I seek. The version of python I am currently using is 3.6.1.

Thanks in advance, and I apologise if my wording confuses you, just ask about what confused you and I will attempt to clarify. Using Windows with the Idle Shell.

Due to the limitations of some python environments, I just used Tkinter to create an interactive procedurally generated script which you can scroll along as if it were the shell, with the added bonus of adding pictures for more depth.

1 Answers
Related