Jump to content
  • Advertisement
Sign in to follow this  
Woodlander

Text in Python

This topic is 4812 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yeah, this is such a terribly basic question, it embarasses me to ask. It also surprises me how very little help I can find on it. I'm currently writing a text-based RPG in Python to get a good grasp on the language. I hit my first snag when I wanted to beautify it up a lil, how can I add colour to the output? If it's possible at all, I'm a little used to BASIC where you just used the COLOR command. So how do I add colour to text (Or the background for that matter) in Python? Thanks in advance =)

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the Module, but I'm having a bit of trouble getting it to work.
I imported WConio, but if I try using:
WConio.textcolor(#)

I get an error saying the GetScreenInfo failed. I thought maybe I was trying to use the wrong function (Possibly WConio.textattr()), either that or I'm meant to be defining or returning a value before trying to do anything.

The site for WConio doesn't appear to have any help for this, I guess they probably figured that anyone using their module would know a thing or two about programming hehe =D

Share this post


Link to post
Share on other sites
Thanks for the help, though I ended up using Console, the curses link guided me there. I have yet to see how well it works but we'll see =)
EDIT
Well Console seems to work decently, but it seems to stop input from the user too. I was tempted to go back to Qbasic for a brief moment >_<. I'm sure I'll manage to figure something out, but any help would really be useful.

As for Curses, I couldn't import it for some reason, it was there but IDLE kept returning an error whenever I tried to import it. Maybe it's because it's a package of modules or something...

[Edited by - Woodlander on June 15, 2005 5:39:11 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!