From: "Mark Smith" <Mark.Smith@capital-fx.co.uk>
Subject: RE: Using Rush in a slightly different way [for Framecycler]
   Date: Wed, 14 Sep 2005 03:06:17 -0700
Msg# 1033
View Complete Thread (2 articles) | All Threads
Last Next
Ah de old Python O'Reilly book...

I probably would have done it something like:

bgcolor = "#222255"
fgcolor = "#ffffff"

htmlstr = "<html>" + "\n"
htmlstr += "<body bgcolor=%(bgcolor)s>" + "\n"
htmlstr += "<font color=%(fgcolor)s>Testing</font>"

print htmlstr % locals()
 
Hadn't thought of doing it with """s. Hardly ever use them.
Saves having to stick in the "\n" I guess but I quite like having things
in variables as so I can pass them around easily. Depends on the
circumstance I guess.

Mark


-----Original Message-----
From: Greg Ercolano [mailto:erco@(email surpressed)] 
Sent: 14 September 2005 04:23
To: void@(email surpressed)
Subject: Re: Using Rush in a slightly different way [for Framecycler]

[posted to rush.general]

 > I've sent you a separate email to this one with attached the command
 > line documentation for sequence publisher and a list of the subset of
 > options we are interested in here to save you as much work as
possible!

	Yes, received -- I'll check it out.

> A simple Python submit script would be brilliant...I'm afraid Perl
sends
> shivers up my spine.

	As soon as I learn enough of python, I'll post something ;)
	I've been flipping through the O'Reilly book.

	The 'here document' stuff had me guessing for a while,
	but I think I've got it solved with:

bgcolor = "#222255"
fgcolor = "#ffffff"

print """
<html>
<body bgcolor=%(bgcolor)s>
<font color=%(fgcolor)s>Testing</font>
""" % locals()

	If there's a better way to embed variables in """'ed text,
	let me know.

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


Last Next