Menu

#207 wrong coloring when sys.ps1 is changed

open
nobody
None
5
2005-04-01
2005-04-01
No

If I set
sys.ps1 = 'py>'
sys.ps2 = '... '
in my sitecustomize.py, then PythonWin colors all text
in the Interactive Window blue, and performs no syntax
highlighting. One hack that fixes this is to put '>>>'
after the copyright information, e.g. replace:
sys.stderr.write("Portions %s - see 'Help/About
PythonWin' for further copyright information.\n" %
(win32ui.copyright,) )
in framework.interact with:
sys.stderr.write("Portions %s - see 'Help/About
PythonWin' for further copyright information.\n>>>\n" %
(win32ui.copyright,) )
This causes code after the '>>>' to be correctly colorized.

Ideally, the code that causes the coloring to be wrong
would be changed, but I couldn't figure that out well
enough to suggest how that might be done.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.