Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
colouring strings
#5
As it seems that only the last part was working I modified the program as:
import sys
from termcolor import colored, cprint


cprint("Attention!", 'red', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'green', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'yellow', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'cyan', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'grey', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'blue', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'white', attrs=['bold'], file=sys.stderr)
cprint("Attention!", 'magenta', attrs=['bold'], file=sys.stderr)
but then everything was printed in red, also with the annoying arrows, brackets and ANSI code numbers:
<-[1m<-[31mAttention!<-[0m
<-[1m<-[32mAttention!<-[0m
<-[1m<-[33mAttention!<-[0m
<-[1m<-[36mAttention!<-[0m
<-[1m<-[30mAttention!<-[0m
<-[1m<-[34mAttention!<-[0m
<-[1m<-[37mAttention!<-[0m
<-[1m<-[35mAttention!<-[0m


(Sep-17-2019, 04:42 PM)snippsat Wrote: Need a better Terminal shell than cmd/Poweshell.
I only use cmder | Github
Also remember to do .\cmder.exe /REGISTER ALL.
So get a shortcut in file explorer,to go directly to cmder.
Test term.py is your latest code.
[Image: hFxVCt.png]
Thanks a lot!
It looks promising, but when executing Cmder.exe, I received a message from my Avast antivirus saying:
Blocked threat
We have blocked init.bat because it was infected with IDP.ALEXA.51


What should I do???
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Reply


Messages In This Thread
colouring strings - by newbieAuggie2019 - Sep-17-2019, 03:06 AM
RE: colouring strings - by wavic - Sep-17-2019, 03:14 AM
RE: colouring strings - by newbieAuggie2019 - Sep-17-2019, 04:23 PM
RE: colouring strings - by snippsat - Sep-17-2019, 04:42 PM
RE: colouring strings - by newbieAuggie2019 - Sep-17-2019, 09:46 PM
RE: colouring strings - by newbieAuggie2019 - Sep-17-2019, 04:48 PM
RE: colouring strings - by snippsat - Sep-17-2019, 05:13 PM
RE: colouring strings - by newbieAuggie2019 - Sep-17-2019, 05:37 PM
RE: colouring strings - by snippsat - Sep-17-2019, 06:22 PM
RE: colouring strings - by wavic - Sep-17-2019, 08:50 PM
RE: colouring strings - by snippsat - Sep-17-2019, 10:11 PM
RE: colouring strings - by newbieAuggie2019 - Sep-20-2019, 07:27 AM
RE: colouring strings - by wavic - Sep-18-2019, 08:25 AM
RE: colouring strings - by wavic - Sep-18-2019, 11:10 AM
RE: colouring strings - by newbieAuggie2019 - Sep-20-2019, 06:34 PM
RE: colouring strings - by newbieAuggie2019 - Sep-22-2019, 07:12 AM
RE: colouring strings - by newbieAuggie2019 - Sep-22-2019, 09:07 AM
RE: colouring strings - by jquast - Oct-22-2019, 02:28 PM
RE: colouring strings - by newbieAuggie2019 - Oct-22-2019, 03:31 PM
RE: colouring strings - by newbieAuggie2019 - Sep-24-2019, 10:42 AM
RE: colouring strings - by wavic - Sep-24-2019, 01:28 PM
RE: colouring strings - by newbieAuggie2019 - Sep-30-2019, 08:20 PM
RE: colouring strings - by jquast - Oct-23-2019, 03:44 AM
RE: colouring strings - by newbieAuggie2019 - Oct-23-2019, 08:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand strings and lists of strings Konstantin23 2 816 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  Splitting strings in list of strings jesse68 3 1,816 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Finding multiple strings between the two same strings Slither 1 2,544 Jun-05-2019, 09:02 PM
Last Post: Yoriz
  lists, strings, and byte strings Skaperen 2 4,263 Mar-02-2018, 02:12 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020