Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
colouring strings
#11
newbieAuggie2019 Wrote:because I tried your suggestion (term.py) and others from the cmder site, and I'm not sure I have done it right:
I did post this,so term.py is just name i used for your code that i run in cmder
(Sep-17-2019, 04:23 PM)snippsat Wrote: Test term.py is your latest code.
# term.py
import sys
from termcolor import colored, cprint
 
text = colored('Hello, World!', 'red', attrs=['reverse', 'blink'])
print(text)
cprint('Hello, World!', 'green', 'on_red')
 
print_red_on_cyan = lambda x: cprint(x, 'red', 'on_cyan')
print_red_on_cyan('Hello, World!')
print_red_on_cyan('Hello, Universe!')
 
for i in range(10):
    cprint(i, 'magenta', end=' ')
 
cprint("Attention!", 'red', attrs=['bold'], file=sys.stderr)
newbieAuggie2019 Wrote:I always have problems with path
Windows Path most work,means that python and pip command most work form any folder.
C:\code
λ python -V
Python 3.7.2

C:\code
λ pip -V
pip 19.2.3 from c:\python37\lib\site-packages\pip (python 3.7)
If don't work fix it,all info needed is here Python 3.6/3.7 and pip installation under Windows.
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 813 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  Splitting strings in list of strings jesse68 3 1,815 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Finding multiple strings between the two same strings Slither 1 2,543 Jun-05-2019, 09:02 PM
Last Post: Yoriz
  lists, strings, and byte strings Skaperen 2 4,259 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