hello Glynn<div>I'm trying to parse a list of strings like this:</div><div> sys.stdout.write(output_v)</div><div>And I get this error</div><div><div>TypeError: argument 1 must be string or read-only character</div>
<div>buffer, not list</div><div>Any suggestion to do this?</div><div>Thanks</div><br><div class="gmail_quote">2011/2/10 Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
katrin eggert wrote:<br>
<br>
> I have built a GRASSPy Script to read a few text files (<a href="http://r.in.text.py" target="_blank">r.in.text.py</a>)<br>
> At the end of the file I do a return of a list of integers with:<br>
> values=[1,2,4,5,6,43,32,553,2]<br>
><br>
> return values<br>
><br>
> My question is: I have another GRASS python script that and I want to call<br>
> <a href="http://r.in.text.py" target="_blank">r.in.text.py</a> to get these values.<br>
> What GRASS python functionality shall i use to retrieve these values? (I<br>
> suppose grass.run_command is not a good idea).<br>
<br>
</div></div>Have <a href="http://r.text.py" target="_blank">r.text.py</a> write the data to stdout, then invoke <a href="http://r.text.py" target="_blank">r.text.py</a> via<br>
grass.read_command() or grass.parse_command().<br>
<br>
For more complex data, you could add an option to <a href="http://r.text.py" target="_blank">r.text.py</a> to write<br>
the data in Python's "pickle" format.<br>
<font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></blockquote></div><br></div>