clifford.wells at comcast.net
Sat Aug 23 03:58:41 CEST 2003
On Fri, 2003-08-22 at 11:10, Hilbert wrote:
> I'm using python to output RIB streams for Renderman.
> The RIB stream is a bunch of statements which describes
> a 3d image. The Rib standard allows for blocks which we
> usually indent for better visualization for example:
> Color [1 1 1]
> Surface "constant"
> Sphere(1.0, -1.0, 1.0, 360)
> I'm using CGKit in python which has a Renderman binding,
> so to output the same RIB I'd write:
> But I get an error, because python interprets my indentation
> as a block in the python code. So the only way to write this
> is without the indentation:
> But this is a lot harder to read.
> Is there any way to use such "visual" indentation in python?
I'm sending this again as the message I sent earlier apparently never
There's a bit of added overhead (superfluous tuple creation) but it does
what you ask.
Should I stand midst the breakers, Should I lie with Death my bride?
-This Mortal Coil
More information about the Python-list