katrin eggert wrote:

> I have built a GRASSPy Script to read a few text files (r.in.text.py)
> At the end of the file I do a return of a list of integers with:
> values=[1,2,4,5,6,43,32,553,2]
> 
> return values
> 
> My question is: I have another GRASS python script that and I want to call
> r.in.text.py to get these values.
> What GRASS python functionality shall i use to retrieve these values? (I
> suppose grass.run_command is not a good idea).

Have r.text.py write the data to stdout, then invoke r.text.py via
grass.read_command() or grass.parse_command().

For more complex data, you could add an option to r.text.py to write
the data in Python's "pickle" format.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to