조회 수 10922 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print

https://pypi.python.org/pypi/termcolor


이곳에서 소스를 받아 압축을 해제한후


>> python setup.py install


로 패키지를 설치함



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)


Text Properties

Text colors:

  • grey
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

Text highlights:

  • on_grey
  • on_red
  • on_green
  • on_yellow
  • on_blue
  • on_magenta
  • on_cyan
  • on_white

Attributes:

  • bold
  • dark
  • underline
  • blink
  • reverse
  • concealed

Terminal properties

Terminalbolddarkunderlineblinkreverseconcealed
xtermyesnoyesboldyesyes
linuxyesyesboldyesyesno
rxvtyesnoyesbold/blackyesno
dttermyesyesyesreverseyesyes
teratermreversenoyesrev/redyesno
aixtermnormalnoyesnoyesyes
PuTTYcolornoyesnoyesno
Windowsnonononoyesno
Cygwin SSHyesnocolorcolorcoloryes
Mac Terminalyesnoyesyesyesyes


Dreamy의 코드 스크랩

내가 모으고 내가 보는

List of Articles
번호 분류 제목 날짜 조회 수 추천 수
491 MFC 현재디렉토리의 파일리스트들을 알아오는 클래스 CFindFile 2008.05.07 63092 0
490 LINUX [Shell Script] bash에서 source 명령 2012.01.02 62517 0
489 MFC MFC에서 커맨드 인자(cmd argument) 사용하기 2010.12.13 62147 0
488 C# C# 문자열 숫자형식 포맷팅 String.Format ( C# Numberic Formatting ) 2012.10.10 59868 0
487 MFC 폴더가 존재하는 지 확인하고, 없으면 만드는 함수 2010.02.01 58972 0
486 C# C# 형변환 (문자형 -> 숫자형) / C# Type Change (string -> number) 2012.04.12 57766 0
485 MFC CFileDialog 초기 폴더 지정 2010.08.11 57608 0
484 MFC CString을 유니코드로 변환 WCHAR에 저장하는 방법 1 2006.04.14 57290 0
483 LINUX [Shell Script] 파일을 한줄씩 읽어오기 2014.10.03 56734 0
482 LINUX screen 명령어, 터미널 멀티세션 제공 1 2014.01.21 55879 0
481 MFC Cstring methods 2009.04.21 55455 0
480 MFC 파일 읽기 전용 해제 및 설정 2009.09.11 54748 0
479 C Linked List 예제 (단순 연결 리스트) file 2005.08.10 54536 0
478 일반 bat(배치) 파일 제대로 쓰기 2009.02.24 54437 0
477 MFC 시스템 출력 리디렉션 - 도스 커맨드 결과 받아오기 file 2007.08.14 53503 0
목록
Board Pagination ‹ Prev 1 2 3 4 5 6 7 8 9 10 ... 34 Next ›
/ 34

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Designed by sketchbooks.co.kr / sketchbook5 board skin

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5