471,350 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

sys.ps1 with formatting (linux)

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.

Jul 23 '07 #1
0 825

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by lecichy | last post: by
1 post views Thread by Tonguc Yumruk | last post: by
7 posts views Thread by Kayle | last post: by
2 posts views Thread by Paul Mason | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.