yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02503
Re: SpherePack, question No 3
Hi, Jan,
you should close the file
f.close()
______________________________
Anton Gladkyy
2010/3/8 Honza Stránský <_honzik@xxxxxxxxxx>
>
> Hi,
> I've already solved my problem, so for those who don't know it and would
> use it:
>
> from yade import pack
> sp=pack.randomPeriPack(radius=1.,rRelFuzz=0.,initSize=Vector3().ONE*10.)
> a = sp.cellSize
>
> where a is vector of compression box dimensions.
>
>
> Another question:
>
> from yade import pack
> sp=pack.randomPeriPack(radius=1.,rRelFuzz=0.,initSize=Vector3().ONE*10.)
> a = sp.cellSize
> a=a[0]
> f=open('text','w')
> f.write(str(a))
>
> leaves empty file 'text'. Is there any procedure how can I write data to
> file when running python scripts using YADE?
>
> thanks again for any advice :-)
>
> Jan
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help : https://help.launchpad.net/ListHelp
>
References