[GRASS-dev] G7: m.proj lacking - as default input answer

Vaclav Petras wenzeslaus at gmail.com
Tue Jun 10 14:23:54 PDT 2014


On Tue, Jun 10, 2014 at 5:04 PM, Markus Neteler <neteler at osgeo.org> wrote:

> On Tue, Jun 10, 2014 at 10:29 PM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
> > On Tue, Jun 10, 2014 at 4:07 PM, Markus Neteler <neteler at osgeo.org>
> wrote:
> ...
> >> I wonder if the could additionally allow for a more human readable
> >> form than input=- like we do for separator=...
> >> "stdin" isn't much better for many users, any other ideas?
> >>
> > I don't see a need for more human readable value of input option.
> > Considering a user-beginner using GUI dialog, "no default answer policy"
> > saves him or her from running the module and blocking the GUI* as Martin
> > says.
>
> Well, advanced users fail, see this email from some hours ago:
> https://lists.fossgis.de/pipermail/fossgis-talk-liste/2014-June/006618.html
>
> (you may guess it from German language)
>
> Ach so, Ich verstehe, aber the main problem in this case was the wrong
manual page and also the fact that manual page requires user to understand
unix/linux command line (without explanations or warnings). Former you
fixed, later should be fixed (I'm working on some proposal actually). My
point is that any name you choose will still require user to know what is
standard input and how it is used (e.g. pipe).
I would consider adding synonym if Python compatibility would be a
motivation. In Python, you have for example:

sys.stdin
sys.stdout
sys.stderr

subprocess.PIPE
subprocess.STDOUT

But the usage is a bit different than ours I would say. See Python usage:

p1 = Popen(["dmesg"], stdout=PIPE)
p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
p1.stdout.close()
output = p2.communicate()[0]

versus our usage:

r.something rules=PIPE
r.something rules=stdin
r.something rules=-

Wenzel


> > And advanced user using the real command line probably knows about this
> > convention and what stdin and standard output are and if not, he or she
> is
> > not interested in using input=-.
> > Option output=- is set by default (or is default implicitly as in r59115,
> > hopefully everywhere?), so he or she gets standard output which is
> expected
> > in both GUI and command line and can set a file if this is what he or she
> > wants.
>
> The m.proj example in its manual was definitely broken. I have fixed it in
> https://trac.osgeo.org/grass/changeset/60783
>
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140610/5a391a84/attachment.html>


More information about the grass-dev mailing list