[Radiance-general] Re: python

Jia Hu hujia06 at gmail.com
Mon Jul 12 22:37:58 PDT 2010


Hello:

I  made a simplified python code as bellow.

#!/usr/bin/python
import subprocess
fileHandle = open ('final.txt', 'w')
fileHandle.write ('%s %s %s \n' % (12,25,89))
fileHandle.close()

# valueIll = open ('final.txt', 'a')
creBlinds = subprocess.Popen("genblinds %s %s %d %d %d %d %d \
          | xform -rz -90 -t 2 2 2 >> final.txt " % ('white', 'VBlinds', \
          0.03, 2, 3, 15, 30), shell=True)
fileHandle .close()

fileHandle = open ('final.txt', 'a')
fileHandle.write ('%s %s %s \n' % (52,86,506))
fileHandle.close()

What I expect is the text generated by "Gneblinds" are located between '12
25 89" and "52 86 506". But I find the text in the second line is (52 86
506) and the following text is generated by "genblinds". Could someone give
me some advice  to fix this problem?

Thank you in advance.

Jia




On Fri, Jul 9, 2010 at 5:08 PM, R Fritz <RFritz at lbl.gov> wrote:

> My experiences with Python as a control language are very positive. There's
> a similar case to be made for all the "concise" interpretive languages:
> Python, Ruby, Perl, Lua, and so on, which even includes such tools as LISP,
> which is the granddaddy of them all. I like Python because of the computer
> science attitudes which underly its design: it is readable (at least if one
> grew up with a European language), reliable, and *small*--the manual for the
> basic language can be read in an hour, though the libraries are extensive.
>
> Rhino 5 is planned to use the .NET implementation of Python as its primary
> scripting language, though other .NET languages will be available.
> --
> Randolph Fritz • RFritz at lbl.gov
> Environmental Energy Technologies Division • Lawrence Berkeley Labs
>
>
>
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://radiance-online.org/pipermail/radiance-general/attachments/20100713/d4058ad0/attachment.html


More information about the Radiance-general mailing list