[GRASS-dev] Re: A portible shell for GRASS 7+ ?

David Finlayson david.p.finlayson at gmail.com
Thu Jun 8 14:34:11 EDT 2006


I should add, that one of IPython's features is "autocall". This
removes the need to use parethesis in function calls. What is cool
about this is that we could write wrappers around the grass programs
as functions and within IPython, the syntax of calling the functions
would be virtually identical with the current documentation:

For example:

class general:
     def list(type, mapset):
          print os.popen('g.list type=%, mapset=%' % (type, mapset))

Would be called like this in normal Python:

> import grass
> g = grass.general()
> g.list(type, mapset)
....

In IPython, this could be:

> import grass
> g = grass.general()
> g.list type, mapset
...

That looks almost identical to the current bash command!




More information about the grass-dev mailing list