Redefining "\n"

Patrick K. O'Brien pobrien at orbtech.com
Sun Feb 17 18:39:01 EST 2002


Take a look at the os module, in particular, os.linesep.

--
Patrick K. O'Brien
Orbtech

"Dale Strickland-Clark" <dale at riverhall.NOTHANKS.co.uk> wrote in message
news:nl7v6ugpaa2skti66dlocutacafljsnlh0 at 4ax.com...
> 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