Opened 6 years ago

Closed 4 years ago

#3713 closed enhancement (fixed)

add powershell shell support to grass74.py

Reported by: pmolzer Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Startup Version: 7.4.2
Keywords: Cc:
CPU: Unspecified Platform: MSWindows

Description

I have added powershell as a supported command shell to grass74.py. I don't have SVN commit access and am not on the dev mailing list. Can I just attach the script to this ticket, or should I request some sort of access to SVN?

Attachments (2)

grass74.py (72.1 KB ) - added by pmolzer 6 years ago.
grass.py.diff (934 bytes ) - added by pmolzer 6 years ago.

Download all attachments as: .zip

Change History (15)

by pmolzer, 6 years ago

Attachment: grass74.py added

comment:1 by hellik, 6 years ago

could you add a diff of your changes instead of attaching the whole script? Then it would be easier to see and evaluate the changes.

by pmolzer, 6 years ago

Attachment: grass.py.diff added

comment:2 by pmolzer, 6 years ago

I've attached a diff. I could not find grass74.py in the source but there is grass.py, so I've modified that.

comment:3 by martinl, 6 years ago

In 73814:

add powershell shell support to grass.py (see #3713)

patch provided by pmolzer

comment:4 by martinl, 6 years ago

Slightly modified patch applied to trunk in r73814. Could you test next (no. 348+) WinGRASS build [1]?

[1] https://wingrass.fsv.cvut.cz/grass77/x86_64/

comment:5 by martinl, 6 years ago

Milestone: 7.6.0

Target set to 7.6.0.

in reply to:  2 ; comment:6 by hellik, 6 years ago

Replying to pmolzer:

I've attached a diff. I could not find grass74.py in the source but there is grass.py, so I've modified that.

please add some hints/examples in the GRASS wiki how to use windows powershell in winGRASS. otherwise this functionality will be hidden for the broader user base.

in reply to:  6 comment:7 by veroandreo, 6 years ago

Replying to hellik:

Replying to pmolzer:

I've attached a diff. I could not find grass74.py in the source but there is grass.py, so I've modified that.

please add some hints/examples in the GRASS wiki how to use windows powershell in winGRASS. otherwise this functionality will be hidden for the broader user base.

+1! This would be highly appreciated by those of us Linux users teaching with command line to windows users.

Note also that you can edit this wiki: https://grasswiki.osgeo.org/wiki/GRASS_and_windows_console

Thanks much in advance :)

comment:8 by pmolzer, 6 years ago

will do. I've requested an account for the wiki and wait for approval. Which of these places is the best to add some info?

https://grasswiki.osgeo.org/wiki/GRASS_and_windows_console https://grasswiki.osgeo.org/wiki/GRASS_and_Shell

I'll put some content on use of the GRASS_SH environment variable. maybe also mention the rather heavy escaping needed to call grass from powershell. For example

v.extract input=$state"_Counties" where=`"COUNTY=`'"$ucnty"`'`" output=$cntyname

comment:9 by veroandreo, 6 years ago

I think that the GRASS and Windows console wiki is a good start. I'm not aware of ppl using powershell in Linux, but in any case, we could eventually move the content or just put a link "for powershell usage see here..." in the GRASS and shell wiki.

Thanks much!

comment:10 by pmolzer, 6 years ago

done. also noticed a feature request to add support for the linux subsystem for windows. I gave it a try but its not as simple as it seems.

comment:11 by martinl, 6 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:12 by martinl, 6 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

comment:13 by wenzeslaus, 4 years ago

Resolution: fixed
Status: newclosed

This seems to be already added in r73814. No remaining issues obvious from comments. Closing as fixed. Please, open a new issue on GitHub if you need to follow up.

Note: See TracTickets for help on using tickets.