![](/img/trans.png)
[英]improper output while printing coloured letter of a word in a wordle game in python
我得到的錯誤是: 當我不使用 coloured() function 時,不會出現此錯誤,但在使用時會出現此問題。 ...
[英]improper output while printing coloured letter of a word in a wordle game in python
我得到的錯誤是: 當我不使用 coloured() function 時,不會出現此錯誤,但在使用時會出現此問題。 ...
[英]ModuleNotFoundError: No module named 'term'
這里有什么問題? 我有 python 3.8,但當我嘗試從 termcolor 庫導入“colored”時,不斷收到上述錯誤消息。 我應該嘗試什么? 謝謝你。 ...
[英]Termcolor returning strange string of characters
我正在嘗試構建我自己的 Wordle 版本,但我被困在這里。 這部分代碼的目的是在匹配 position 和密碼的字母時將相應的字符着色為綠色,在匹配字母但不匹配 position 時將其着色為黃色。密碼中不包含的字符是'噸彩色。from termcolor import colored secre ...
[英]Error installing tensorflow with pip, no module named 'termcolor'
我正在嘗試使用 pip install tensorflow 安裝 tensorflow。 我可以安裝其他軟件包,但 tensorflow 無法正常工作。 這是我得到的錯誤: C:\Users\sebas>python -m pip install tensorflow Coll ...
[英]How to make blinking text in python with termcolor?
每當我嘗試使用 termcolor 制作閃爍的文本時,使用以下代碼: 它將文本打印為紅色,但不會閃爍。 我需要使用一些 function 來打開閃爍/類似的東西嗎? 我使用replit.com ,它使用 python 3.8.2。 我也嘗試過 Visual Studio,但它仍然不閃爍。 ...
[英]Is there any python inbuilt module exist which can vary the output size and style?
我正在嘗試放大 output 代碼的大小。 目前我正在研究 window 上的 vs 代碼。 我是一個相當初學者。 我還想在我的源代碼上添加一些高級功能。 代碼: 我想打印一張從 1 到 100 的表格,盡可能美觀。 這是源代碼,這里我使用termcolor來加粗和着色文本。 而 board 只是 ...
[英]When i try to import termcolor on repl.it, it just says the package operation failed
當我嘗試from termcolor import colored, cprint運行時,它不斷出現Repl.it: Package operation failed. 有誰知道問題是什么以及如何解決? ...
[英]How to modify the format when printing?
我的目標是在 Python 中打印時能夠更改默認格式。 使用以下代碼,我可以更改顏色、粗體和居中。 我也想改變字體大小甚至字體樣式,但我不知道怎么做。 ...
[英]Not able to install the latest termcolor version
我正在嘗試安裝 termcolor 版本 1.1.0,以便我可以進一步安裝 Tensorflow,因為存在依賴關系,但無法安裝最新的 termcolor。 目前,我的termcolor版本是0.2 我嘗試了幾種方法,比如 --upgrade,但沒有運氣.. 請幫忙。 ...
[英]How do I make a string split by every letter
我想制作一個使用 termcolor 制作文本彩虹的程序,但我不知道如何將字符串變成字母代碼: ...
[英]I can not properly output the color text in python
使用此代碼時: 我在終端中的 output 是: ←[31mhello←[0m ←[32mworld←[0m 有什么問題? ...
[英]How can I print colored pyfiglet text in windows cmd
您好,所以我正在使用 Python 並且我想在使用 figlet_format 時用顏色打印出程序的名稱,所以我在 vscode 中運行良好,但是當我嘗試在 cmd 中運行文件時,它會打印: 打印它在 vscode 中打印的內容: 所以我想知道在使用 pyfiglet 時是否有辦法在 cmd 中打 ...
[英]Termcolor "colored" outputting weird characters
我已經將 python 安裝到我的命令提示符( cmd )中 命令提示符: 這里是奇怪的輸出: [32mhi[0m我試過 python shell,但它不起作用。(見下圖) ...
[英]Issues with box drawing character interface
我正在使用終端音樂播放器。 我幾乎已經完成了制圖界面。 如您所見,我的右邊框( "║" )斷了。 我試圖做到。 但是出了點問題,這是行不通的。 看一下我的代碼: ...
[英]AWS CodeBuild Colorized logs
我正在嘗試使用腳本中的termcolor着色顯示彩色日志,當我在本地運行腳本時一切正常,但是當我的腳本由 aws codePipeline --> codeBuild 運行時,output 格式看起來像是 termcolor 不起作用。 第一張圖片顯示了 aws 上的當前 output。 第二 ...
[英]Highlight specific words in a sentence in python
我有一些文字,我想強調具體的話。 我寫了一個腳本來循環顯示單詞並突出顯示所需的文本,但是如何設置它以將其返回到句子? 在上面的例子中,我希望最終輸出兩個句子,而不是所有單詞的列表,並突出顯示相關單詞 ...
[英]instead of getting a color i get this [31mHello World !!![0m using termcolor and colored
我嘗試使用不同的方法,結果在cmd和poweshell中相同,但是我無法顯示顏色。 我使用的代碼: 輸出: 我在“ Hello World !!!”周圍得到這個奇怪的角色。 並且沒有出現彩色。 ...
[英]How to modify font size Pyfiglet
我正在嘗試使用模塊 pyfiglet 和 termcolor 在帶有 python3 的終端中打印一些 ascii 文本藝術,我想知道是否有一種方法可以修改打印的 ascii 文本的大小。 現在我正在使用此代碼打印 ascii 藝術文本: from termcolor import colored, ...
[英]Termcolor remove color from string
在此代碼中,它使字符串“ hello”變為紅色: 是否有辦法使變量變成沒有顏色的普通字符串? ...