Redefining "\n"

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Sun Feb 17 07:18:47 EST 2002


Is there some way to redefine the "\n" escape sequence?

When preparing strings for the Windows clipboard, I need \x0d\x0a for
a newline which is a bit cumbersome to insert all over the place.

It would be neat if I could make "\n" insert some other sequence.

I know I can do a translation before sending the string to the
clipboard but this would be nicer.

--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list