sys.ps1 with formatting (linux)

J

Jon Dobson

I'm trying to set sys.ps1 and sys.ps2 with some formatting (linux) using:

python -i -c 'import sys; sys.ps1="\033[1m\033[32mspy>\033[0m";sys.ps2="\033[1m\033[32m .\033[0m"'

I get the colored prompt(s) as you might expect, but I'm getting some strange behavior with wrapping. Once the interactive command gets long enough to wrap, it wraps back to the same line (overwriting the beginning). It doesn't break anything - the command gets interpreted correctly, it's just an ugly way to work.

What's even "cooler" is when I middle-mouse-paste a command and then try to edit the line, it moves up one line in the shell and prints the command I'm editing (minus the character I just deleted). Once again, it's just a display issue - the commands still work.

I realize this is pretty obscure, but I'm just hoping someone else has seen and dealt with something like this...

tx

_____________________________________________________________________
The information contained in this message and its attachments is
confidential and proprietary to LAIKA, Inc. By opening this email
or any of its attachments, you agree to keep all such information
confidential and not to use, distribute, disclose or copy any part
of such information without the prior written consent of LAIKA,
Inc. If you are not the intended recipient of this message, any use,
distribution, disclosure or copying of such information is prohibited.
If received in error, please contact the sender.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top