print color
v0.4.6
from print_color import print
print ( "Hello world" , tag = 'success' , tag_color = 'green' , color = 'white' )印刷顏色是Python終端顏色印刷的簡約方法。它是圍繞print()函數的包裝器,僅允許您提供額外的可選參數,例如:
tagtag_color或tag_colourtag_formatcolor或colourbackgroundformat它旨在成為應用程序的可自定義記錄儀,並使格式警告,信息消息和錯誤變得輕而易舉。
該項目沒有依賴性,除了測試的pytest 。
在此處查看有關PYPI的項目。
顏色:
purple
blue
green
yellow
red
magenta
cyan
white
black
tagtag_color或tag_colourcolor或colourbackgroundformatpip3 install print-color from print_color import print
print ( "Hello world" , tag = 'success' , tag_color = 'green' , color = 'white' ) print ( "Error detected" , tag = 'failure' , tag_color = 'red' , color = 'magenta' ) print ( "Printing in color" , color = 'green' , format = 'underline' , background = 'grey' )隨意添加或改進該項目:)只需創建一個拉動請求,並解釋您提出的更改即可。請注意,由於這是一個非常簡單的項目,因此應將功能請求保持在最低限度 - 更多的顏色,格式等是理想的選擇。
由Python詩歌建造。