#2314: output r.out.xyz -------------------------------------------------+-------------------------- Reporter: pvanbosgeo | Owner: grass-dev@… Type: defect | Status: new Priority: normal | Milestone: 7.0.0 Component: Default | Version: svn-trunk Keywords: separator, pipe, r.out.xyz, r.stats | Platform: MSWindows 7 Cpu: All | -------------------------------------------------+--------------------------
Comment(by hcho): Replying to [comment:25 glynn]: > Replying to [comment:18 annakrat]: > > > > If a command is executed via e.g. grass.run_command(), Python's subprocess.Popen() provides the necessary quoting. > > > > Apparently not. > > Er, sort of. It quotes it, but the shell interprets | (and < and >) even when quoted. > Quoting didn't help. I had to escape special characters with {{{^^^}}} in r60634. It looks like subprocess.Popen(shell=True) calls cmd.exe twice, so double escaping was needed. E.g., to escape {{{|}}}, {{{^^^|}}}} needs to be fed into cmd.exe, but since cmd.exe is called twice, three {{{^}}} becomes six {{{^}}} and {{{|}}} becomes {{{^|}}}. So we need {{{^^^^^^^|}}}. I tested r60634 on Windows 7 with trunk and it worked. Now back to G_OPT_F_SEP, since we fixed {{{|}}}, showing {{{|}}} or pipe as default is a preference only. Regarding the backtick issue, it was not exactly an issue because cmd.exe does not support backticks anyway. I talked about g.mlist output=, which was implemented recently. There was no way to support backticks, so we had to implement output=. -- Ticket URL: <http://trac.osgeo.org/grass/ticket/2314#comment:26> GRASS GIS <http://grass.osgeo.org> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev