Sometimes when I run a python terminal application of mine, I get weird characters all over the place. See screenshot. This only happens once in ten times.
I haven't seen this happen in other terminals. What's going on?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
It is a bug in your Python code. The characters are all Unicode 001B, U+001B is the escape character. Your terminal is rendering it as a box with 001B inside. Your Python program is printing escape characters to the terminal, which is interpreting them as Unicode characters. You can reproduce this easily:
$ python Python 2.7.7rc1 (default, May 21 2014, 11:15:30) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print chr(0x001b)