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
24
votes
1 answer

Tee does not show output or write to file

I wrote a python script to monitor the statuses of some network resources, an infinite pinger if you will. It pings the same 3 nodes forever until it receives a keyboard interrupt. I tried using tee to redirect the output of the program to a file,…
Nate Mara
  • 3,028
  • 21
  • 43
14
votes
9 answers

How to Install Colorama, Python

I downloaded the colorama module for python and I double clicked the setup.py. The screen flashed, but when I try to import the module, it always says 'No Module named colorama' I copied and pasted the folder under 'C:\Python26\Lib\site-packages'…
Mike
  • 3,543
  • 14
  • 48
  • 79
7
votes
4 answers

tqdm progressbar and colorama do not work together

I want to use colorama, but I already use tqdm in my code. Example: import colorama as color import tqdm as tqdm # without line it's working print(color.Fore.GREEN + 'Green text') It's working fine without tqdm, but if I import tqdm, colorama…
7
votes
2 answers

Python colorama not working with input?

Finally got colorama working today, and it works excellent when printing strings, but I got the common error everyone seems to get when I attempted to use colorama with input. Here's my code: launch = input(Fore.GREEN + "Launch attack?(Y/N):…
user3552616
6
votes
1 answer

How to apply coloring/formatting to the displayed text in input()-function (similar to print statement formatting)?

I have a small game application, which is started from the Windows console (cmd.exe). I am able to format the text in any desired way using ANSI escape sequences. I would also love to apply formatting to the text from the input()-method, but I have…
Cut7er
  • 1,160
  • 6
  • 24
5
votes
2 answers

Can the default error color be changed in python?

When running python scripts or programs built using python, errors are emitted in dark red. As I get older, this is getting harder for me to read, to the point I have to squint, magnify, or fuss with the console properties and re-run commands. I…
StingyJack
  • 17,990
  • 7
  • 58
  • 115
5
votes
2 answers

aws CLI unable to be used due to module colorama

aI've installed AWS CLI and am trying to use it on Mac OS Sierra. It complains there is is no module colorama: $ aws Traceback (most recent call last): File "/usr/local/bin/aws", line 19, in import awscli.clidriver File…
Growler
  • 10,676
  • 21
  • 100
  • 224
3
votes
2 answers

Python replace() string with color?

I'm making a Python Syntax Highlighter and basically what it does is replaces keywords in the entered string with colored versions of the same string. Here's a sample of my code (the whole program is basically just copy+pasting this code) from…
Donoru
  • 139
  • 7
3
votes
2 answers

Trouble installing colorama

C:\Users\*****>pip install colorama Collecting colorama Using cached colorama-0.4.3-py2.py3-none-any.whl (15 kB) Installing collected packages: colorama Successfully installed colorama-0.4.3 C:\Users\*****>python Python 3.8.1…
3
votes
1 answer

Colorama AssertionError in Python 3.2

I've recently started using Python 3.2 and have never attempted programming before. I copied the colorama folder to the lib directory in C:\Python32\lib and then made the following code in my attempt at a text-based adventure game: import colorama …
Jack
  • 321
  • 2
  • 3
  • 5
3
votes
1 answer

How to generate a Python output file with color formatting?

How can I instruct python to generate an output file which keeps the color formatting specified in the main script? I am working on the WRDS Cloud and I am using a shell file to execute a python script. The Cloud returns an output file which I can…
3
votes
1 answer

Use colorama to change text color of Python input

When I try to use colorama with the python input statement, it doesn't work. This is the output I get: [33mEnter the name of the AWS account you'll be working in: It shows the ASCII code instead of using the color that I want. And it doesn't change…
bluethundr
  • 540
  • 10
  • 39
  • 81
3
votes
2 answers

Print cmd with colors

I am trying to get colored command line output. I was able to get colored Python console output using colorama with this: from colorama import Fore from colorama import…
mrCarnivore
  • 2,992
  • 1
  • 9
  • 25
3
votes
1 answer

IOError: [Errno 0] Error while writing to output of Powershell in VSCode

This is the error I get in VSCode when running docker-compose. PS D:\Work\Imho\Api> docker-compose -f docker-compose.yml up Creating network "api_default" with the default driver Pulling ignite (apacheignite/ignite:latest)... latest: Pulling from…
Lanayx
  • 2,183
  • 1
  • 20
  • 31
3
votes
1 answer

Use curses with colorama

Is it possible to use curses with colorama? Here is my code, it prints the escape sequences: from curses import wrapper import colorama STYLE = colorama.Fore.GREEN + colorama.Back.BLUE TITLE = STYLE + 'Current terminal size:' HEIGHT_STRING = STYLE…
Anonimista
  • 732
  • 1
  • 5
  • 12
1
2 3 4 5 6 7