[Tutor] here documents
John Purser
johnp at milwaukielumber.com
Tue Jan 4 01:55:07 CET 2005
I'd like to thank everyone who posted on this thread. I was reading a Korn
shell manual the other day and could not figure out what a "here" document
was. I'm going to take another run at it with this conversation in mind!
Sometimes I can't see the path until I know where it goes.
John Purser
-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Michael Powe
Sent: Monday, January 03, 2005 14:55
To: tutor at python.org
Subject: [Tutor] here documents
Hello,
In perl, I create variables of fairly involved text using here
documents. For example,
$msg = <<"EOF";
a bunch of text here.
...
EOF
Is there an equivalent method in python? I usually use this method
when creating help messages for scripts -- put all the text into a
variable and the 'print $msg' for the output. I find it an easy way
to produce formatted text.
Now, I'm trying to switch over to python and want to recreate or adapt
my processes.
Thanks.
mp
_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list