Questions tagged [colorama]

Simple cross-platform colored terminal text module for producing colored terminal text and cursor positioning work under MS Windows.

Makes ANSI escape character sequences for producing colored terminal text and cursor positioning work under MS Windows.

Homepage

Python Package Index (PyPI) repository

97 questions
0
votes
1 answer

Positioning the cursor in Windows 10 terminal window using colorama

Every bit of documentation I've found suggests that this should work, but the cursor position doesn't return to 0,0. colorama.init() def move (y, x): print("\033[%d;%dH" % (y, x)) for file in original_file: for element in root.iter(): …
Emil Visti
  • 47
  • 1
  • 6
0
votes
1 answer

ImportError when installing Colorama

I installed Colorama into Google Colab. When I tried to import it, it shows ImportError: import colorama ImportError Traceback (most recent call last) in () ----> 1 import…
0
votes
1 answer

Colorama tool on looping through a list- not working in terminal (Python)

I am unable to get a coloured output on the following: Letters= ['QWERTYUPOIFSAJKVMPFOQWKFWSPAEOOIUSKFISPLCKSKLJHXIWTSLAVW'] data = (Letters) from colorama import init init() init(convert=True) from colorama import Fore Selection1 =…
0
votes
1 answer

How do I use colorama inside a tuple?

I'm trying to change individual existing lines inside an existing tuple. Example: for row in cursor: print(f''' ID: ........... {row[0]} Name: ......... {row[1]} Age: .......... {row[2]} Condition: .... {row[3]} …
Robert
  • 5
  • 2
0
votes
0 answers

ImportError for Fore in colorama in python

I was trying Colorama in Python, I imported colorama and then initiated it because I am using Windows 7 64-bit. But somehow after importing Fore, Back, Style from Colorama, and then when I run the program in my Command Prompt, it shows - Import…
0
votes
1 answer

Why I receive ImportError: cannot import name 'fore' from 'colorama'?

I can execute colorama module and I receive an error. My code from colorama import init init() from colorama import fore, back, style what = input( print.red + "What kind of operation? (+, -, /, *): ") a = float( input("Input first number?: ") ) b =…
0
votes
1 answer

Colorama outputs random things

I'm using colorama to color my terminal. I have a auto updater and I colored it up. The output I get if I compile it into a exe is: ←[36mYour ←[34mVersion ←[36mis Old! press enter to Update the Application to v0.0.2.2... No color at all. I think…
LeQuit
  • 27
  • 6
0
votes
0 answers

Python - Colorama - printing at specific position

I want a user to select matrix coefficients at specific locations. I get weird left arrows in the terminal which seems to me the terminal cannot "support" it. I had the same issue once I wanted to represent by points the elements of each…
0
votes
1 answer

Find a string in sentence and change the string's color and display in tkinter label python

I want to look for a selected keyword and change its font color in a label text. The code below that print in terminal. import colorama as color text = 'This is a long strings. How many strings are there' x = 'strings' if x in text: …
Leow
  • 13
  • 3
0
votes
0 answers

Print colored output based on condition in python shell

i've a dataframe which looks like this: count time outcount outtime 151 9:01 151 9:05 198 9:35 190 9:39 0 - 5 10:25 I want to color entire row where count is not equal to outcount, and print…
0
votes
2 answers

Am i able to use user input as the colour in colorama module?

i am trying to write a program using the colorama module that prints a user's input message in a chosen colour. Is there any way to do this other than using a bunch of If statements. Here is my code at the moment: From Colorama Import Fore, Init…
eric06
  • 1
  • 1
0
votes
2 answers

Changing the colour of text when printing

I am currently designing a simple game and I am trying to change the colour of specific things I am printing. Already I have downloaded the colorama module and ran my code using a sample I've found online, but this doesn't work (I'll tell the…
0
votes
1 answer

How To Print Grid In Python Without "Flashing" Screen

In the program I've been working on in Python, I need to be able to print a list of elements one by one, going to a new line after n elements to form a grid. However, every time the program reprints the grid, you can see it progressing element by…
Starspiker
  • 11
  • 2
0
votes
1 answer

subprocess.call output in color

Is there a way to display subprocess.call output in a different color and than come back to the default one? I am using colorama. but the below won't work for me. the print one works fine and prints test in green. subprocess.call(["%s; " %…
0
votes
1 answer

Changing the X and Y position of the input's cursor/pointer

So, I have this code here: from colorama import Fore, Back, Style from colorama import init from termcolor import colored init() print(Fore.RED + "Command >> ") ## Red-colored print statement print(Style.RESET_ALL) ## Reseting the colors back to…
Sheep1Coder
  • 55
  • 1
  • 1
  • 10