From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: Using Rush in a slightly different way [for Framecycler]
   Date: Wed, 14 Sep 2005 12:42:53 -0700
Msg# 1034
View Complete Thread (2 articles) | All Threads
Last Next
Mark Smith wrote:
Hadn't thought of doing it with """s. Hardly ever use them.

	The """'s are useful when you have 100's lines of html,
	or in the case of rush, 100's of lines of GUI description text
	that's being piped to the rush 'input' program.

	python's """ syntax is similar to the csh/sh/perl/ruby 'here document'
	syntax which is usually of the form:

cat << EOF
   Lots of lines of stuff here..
   one two three
   four five six
EOF

	..that being a CSH example.

Saves having to stick in the "\n" I guess

	..and all the '"'s and '+'s ;)

but I quite like having things in variables as so I can pass them around easily.

	The """ syntax works with variables too, eg:

some_variable = """
   Lots of lines of stuff here..
   one two three
   four five six
"""

	That being the equivalent of:

some_variable = "\n" +
		"    Lots of lines of stuff here..\n" +
                "    one two three\n" +
                "    four five six\n" +
		"\n"

--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Cel: (Tel# suppressed)
Fax: (Tel# suppressed)

Last Next