I have making a program.
It needs show some colorful words use this:
\033[1mabc
I tryed this command and it failed:
import tkinter as tk
root=tk.Tk()
text=tk.Text(root)
text.insert('end', '\033[1mabc')
It shows a tofu and [1mabc.
But I want get a red abc.
How can I get it?
P.S. It will do like this:
import socket
import tkinter as tk
root=tk.Tk()
// connect the port use socket 'socket'
text=tk.Text(root)
text.insert('end', socket.read(1024))
And in the port of the computer:
//socket connected front is 'socket'
// when connect
import subprocess
command=subprocess.Popen(socket.read(1024), shell=True, output=subprocess.PIPE, error=subprocess.INPUT)
socket.send(command.output.read(1024))
// stop the 'command' Popen


