Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-14 Thread Markus Neteler
On Wed, Apr 9, 2014 at 4:07 AM, Glynn Clements wrote: > Packages which include command-line programs (e.g. compilers) > typically either modify the environment variables (e.g. PATH) via the > registry[1], or provide a .bat/.cmd file which must be run to set up > the environment for a particular sh

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-08 Thread Glynn Clements
Vaclav Petras wrote: > > I think this is very common in companies and public institutions. I > > know several companies with much more restrictive guideline (no > > internet connection, USB sticks not allowed, ...). So you can't expect > > that user have a free choice. > > Hi, I don't understand

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-08 Thread Newcomb, Doug
On Thu, May 8, 2014 at 9:52 AM, Vaclav Petras wrote: > > On Thu, May 8, 2014 at 9:22 AM, Sören Gebbert < > soerengebb...@googlemail.com> wrote: > >> > >> > On MS Windows, users do have a free choice of what they install. Third >> > party software packages are on MS Windows completely independent

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-08 Thread Vaclav Petras
On Thu, May 8, 2014 at 9:22 AM, Sören Gebbert wrote: > > > > On MS Windows, users do have a free choice of what they install. Third > > party software packages are on MS Windows completely independent of > > each other. If you don't like this, you have to change the MS Windows > > world first, the

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-08 Thread Sören Gebbert
Hi Markus, 2014-05-07 21:50 GMT+02:00 Markus Metz : > On Wed, Apr 30, 2014 at 9:51 AM, Glynn Clements > wrote: >> >> Markus Metz wrote: >> >>> >> > By all means provide fall-backs, workarounds, alternatives, or >>> >> > whatever, but anything which tries to make such things mandatory is >>> >> >

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-07 Thread Glynn Clements
Markus Metz wrote: > >> People installing GRASS want to use GRASS. They want GRASS to work out > >> of the box. They can use any Python version they want, as long as > >> WinGRASS uses its embedded Python version. Users will not notice it. > > > > You're assuming that users have a free choice as

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-05-07 Thread Markus Metz
On Wed, Apr 30, 2014 at 9:51 AM, Glynn Clements wrote: > > Markus Metz wrote: > >> >> > By all means provide fall-backs, workarounds, alternatives, or >> >> > whatever, but anything which tries to make such things mandatory is >> >> > going to get reverted. Again. >> >> >> >> really nice attitude

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-30 Thread Newcomb, Doug
Hi folks, A lot of the folks I introduce to GRASS are already GIS users, using a different GIS software package. They are unlikely to stop using their existing software while trying GRASS, have a "spare" computer that would only have GRASS loaded, or be able to install a virtual instance of window

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-30 Thread Glynn Clements
Markus Metz wrote: > >> > By all means provide fall-backs, workarounds, alternatives, or > >> > whatever, but anything which tries to make such things mandatory is > >> > going to get reverted. Again. > >> > >> really nice attitude ;-) Martin > > > > At least I'm not saying "you ARE going to use

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-30 Thread Glynn Clements
Moritz Lennert wrote: > Can everyone agree on that solution (not meaning that you consider it > the best solution, but that you can live with it) ? I can live with anything that doesn't require significant work to undo (i.e. revert to the state where the platform's native mechanisms are used wi

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-30 Thread Glynn Clements
Markus Metz wrote: > GRASS has to check each time it is started if a compatible system-wide > .py file association is available. This is IMHO nonsense. Performing that test would be nonsense. Any application depends upon certain functionality being provided by the underlying platform. There are

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-28 Thread Helmut Kudrnovsky
Hamish wrote: >I think that's more a reflection on the way things are done in the MS >Windows world: the last program to install itself wins. yes >Which leads to >the usual 1st trouble shooting step on Windows after seeing if a >rebooting helps: try uninstalling then reinstalling the program. Th

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-28 Thread Markus Neteler
On Mon, Apr 28, 2014 at 9:37 AM, Moritz Lennert wrote: ... > From the current discussion I take that the .bat file solution is one that > will satisfy those who want GRASS to "just work" on MS Windows without > putting any burden on the user. In order to not dissatisfy those who do not > want GRAS

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-28 Thread Moritz Lennert
On 27/04/14 22:52, Markus Metz wrote: I do not understand this ongoing discussion on WinGRASS7+Python. My proposed solution caters for all possibilities, in particular: - an existing incompatible .py file assocation [add your workaround here] - changes in any existing .py file association after

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-27 Thread Vaclav Petras
On Sun, Apr 27, 2014 at 7:34 PM, Hamish wrote: > Markus Metz wrote: > > ESRI assumes that their system-wide Python installation will never > > change. That is rather ignorant. I don't think GRASS should mimik the > > aggnorant ignorance of ESRI. > > I think that's more a reflection on the way thi

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-27 Thread Hamish
Markus Metz wrote: > ESRI assumes that their system-wide Python installation will never > change. That is rather ignorant. I don't think GRASS should mimik the > aggnorant ignorance of ESRI. I think that's more a reflection on the way things are done in the MS Windows world: the last program to in

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-27 Thread Markus Metz
I do not understand this ongoing discussion on WinGRASS7+Python. My proposed solution caters for all possibilities, in particular: - an existing incompatible .py file assocation [add your workaround here] - changes in any existing .py file association after GRASS has been installed [add your chec

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-27 Thread Markus Metz
On Sat, Apr 26, 2014 at 1:16 PM, Glynn Clements wrote: > > Martin Landa wrote: > >> > By all means provide fall-backs, workarounds, alternatives, or >> > whatever, but anything which tries to make such things mandatory is >> > going to get reverted. Again. >> >> really nice attitude ;-) Martin > >

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-26 Thread Helmut Kudrnovsky
wenzeslaus wrote > Please consider this scenario: > > 1. user installs ArcGIS which installs Python system-wide > 2. user installs GRASS GIS which will use system-wide Python 2. may or may not work out of the box ... there are a lot of uncertain issues to consider (version, dependencies, etc. etc

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-26 Thread Vaclav Petras
On Sat, Apr 26, 2014 at 6:42 AM, Glynn Clements wrote: > > >> It's easier to check if the file is a python script and if so than > > >> to force to use bundled version of Python. > > > > > > So long as I have commit access, GRASS isn't going to be "forcing" the > > > use of a non-system Python. >

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-26 Thread Martin Landa
2014-04-26 13:16 GMT+02:00 Glynn Clements : > At least I'm not saying "you ARE going to use our version of Python, > whether you like it or not". please ask the Windows users, 99.9% they don't care or they will not understand your question. The question is completely pointless. The most of users

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-26 Thread Glynn Clements
Martin Landa wrote: > > By all means provide fall-backs, workarounds, alternatives, or > > whatever, but anything which tries to make such things mandatory is > > going to get reverted. Again. > > really nice attitude ;-) Martin At least I'm not saying "you ARE going to use our version of Pytho

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-26 Thread Glynn Clements
Markus Metz wrote: > >> It's easier to check if the file is a python script and if so than > >> to force to use bundled version of Python. > > > > So long as I have commit access, GRASS isn't going to be "forcing" the > > use of a non-system Python. > > But an existing system Python on MS Window

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-25 Thread Vaclav Petras
On Fri, Apr 25, 2014 at 4:18 AM, Moritz Lennert < mlenn...@club.worldonline.be> wrote: > On 25/04/14 09:36, Markus Metz wrote: > >> On Fri, Apr 25, 2014 at 5:18 AM, Glynn Clements >> wrote: >> >>> >>> Martin Landa wrote: >>> >>> It's easier to check if the file is a python script and if so than

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-25 Thread Moritz Lennert
On 25/04/14 09:36, Markus Metz wrote: On Fri, Apr 25, 2014 at 5:18 AM, Glynn Clements wrote: Martin Landa wrote: It's easier to check if the file is a python script and if so than to force to use bundled version of Python. So long as I have commit access, GRASS isn't going to be "forcing"

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-25 Thread Martin Landa
2014-04-25 5:18 GMT+02:00 Glynn Clements : > By all means provide fall-backs, workarounds, alternatives, or > whatever, but anything which tries to make such things mandatory is > going to get reverted. Again. really nice attitude ;-) Martin -- Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa _

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-25 Thread Martin Landa
Hi, 2014-04-25 9:36 GMT+02:00 Markus Metz : >>> It's easier to check if the file is a python script and if so than >>> to force to use bundled version of Python. >> >> So long as I have commit access, GRASS isn't going to be "forcing" the >> use of a non-system Python. > > But an existing system P

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-25 Thread Markus Metz
On Fri, Apr 25, 2014 at 5:18 AM, Glynn Clements wrote: > > Martin Landa wrote: > >> It's easier to check if the file is a python script and if so than >> to force to use bundled version of Python. > > So long as I have commit access, GRASS isn't going to be "forcing" the > use of a non-system Pyth

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-24 Thread Glynn Clements
Martin Landa wrote: > It's easier to check if the file is a python script and if so than > to force to use bundled version of Python. So long as I have commit access, GRASS isn't going to be "forcing" the use of a non-system Python. By all means provide fall-backs, workarounds, alternatives, or

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-23 Thread Hamish
Glynn: >>>  Batch files are a better solution, as they don't affect anything else, >>>  and it's a simple matter to either delete them or modify PATH to >>>  ignore them, and use the Python scripts directly. MMetz: >>  Sounds good. Martin: > I am not sure, what about user scripts? a new g.bat

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-23 Thread Martin Landa
Hi, 2014-04-23 21:56 GMT+02:00 Markus Metz : >> Batch files are a better solution, as they don't affect anything else, >> and it's a simple matter to either delete them or modify PATH to >> ignore them, and use the Python scripts directly. > > Sounds good. I am not sure, what about user scripts?

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-23 Thread Markus Metz
On Wed, Apr 23, 2014 at 1:37 AM, Glynn Clements wrote: > > Markus Metz wrote: > >> Therefore it is IMHO not a good idea to rely on a system-wide Python >> file association on MS Windows, > > Regardless of whether or not it's a good idea, it's not entirely > avoidable. Sure it is. > > If a process

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-22 Thread Glynn Clements
Markus Metz wrote: > There seems to be agreement that changing an existing Python file > association is not a good idea. The problem is that every possible solution has some aspect which is "not a good idea". > An existing Python file association on MS Windows can change or > disappear any time

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-22 Thread Markus Metz
A short comment about GRASS as a monolithic application or not: On every OS where I tested various GRASS versions (I tested on various Linux distros, on various FreeBSD versions, on various NetBSD versions, on 2 Solaris versions and helped give IBM AIX a try) and on all these OS's I started GRASS w

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Glynn Clements
Helmut Kudrnovsky wrote: > not including python, have a look here: > > http://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Packager.bat.tmpl#L113 > > @echo Copy Python content to PACKAGE_DIR\Python27 > > and then maybe you have to adapt the starting script and all other ?! I

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Glynn Clements
Moritz Lennert wrote: > the argument that GRASS4Win should be a different beast > than GRASS4NIX in that it should become a monolithic integrated > application, which, IMHO, fundamentally alters the very nature of what > GRASS is. There's no fundamental reason why we can't have "Lite" and "Fu

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Helmut Kudrnovsky
>So, there is a vision by some that for the reasons of apparent >"incompatibility" between the way GRASS works and Windows, >GRASS has to >be different on windows. I.e. that GRASS has to become a monolithic >application on Windows. I wouldn't call it incompatibility and I think GRASS hasn't to b

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Martin Landa
2014-04-14 9:53 GMT+02:00 Moritz Lennert : > There is quite a large margin between creating a monolithic application with > everything bundled and leaving the user alone... > > To answer Martin's call for concrete action: how difficult would it be for > you, Helmut, to create a GRASS installer with

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Moritz Lennert
On 14/04/14 00:21, Helmut Kudrnovsky wrote: Hi Moritz, 1) Should GRASS be the same (i.e. feature parity) on all platforms ? for sure, why not? Not to single out MarkusM, but just since he formulated it so clearly: >On 09/04/14 08:16, Markus Metz wrote: >> On Windows, GRASS should behave li

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Moritz Lennert
On 13/04/14 20:33, Martin Landa wrote: 2014-04-13 17:03 GMT+02:00 Moritz Lennert : On 11/04/14 13:05, Martin Landa wrote: I don't think this a very helpful attitude. This whole debate is not about one bad guy keeping the rest of the good guys from moving forward. First of all, Glynn is not alone

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-14 Thread Moritz Lennert
On 13/04/14 20:32, Jürgen E. Fischer wrote: And IMHO the broader topics would have been better addressed in (a) separate thread(s) and not side-track this one. Your original problem got out of focus, but still isn't solved, is it? IMHO, the broader topics are the core of this thread ! ;-) Mor

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Vaclav Petras
On Sun, Apr 13, 2014 at 12:52 PM, Benjamin Ducke wrote: > But please: Let's keep (minor) version-specific Python support > and all of its associated problems out of the core release. > > I really believe that this whole conundrum was caused by not > taking that step earlier. > The problem is caus

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Helmut Kudrnovsky
Hi Moritz, >1) Should GRASS be the same (i.e. feature parity) on all platforms ? for sure, why not? >2) How much less effort can we ask of Windows users than we ask of users >of other platforms ? > >GRASS was developed in a time when Windows didn't even exist. And it was >developed in a very t

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Martin Landa
> nobody is saying anything about a bad gay, it's your feeling not mine well, I meant "a guy" of course :-) I hope that there is at least a reason to smile ;-) Martin -- Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa ___ grass-dev mailing list grass

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Jürgen E . Fischer
Hi Moritz, On Sun, 13. Apr 2014 at 17:03:17 +0200, Moritz Lennert wrote: > On 11/04/14 13:05, Martin Landa wrote: >> 2014-04-11 12:42 GMT+02:00 Jürgen E. : > >> That way you could use the stock sources and wouldn't have to use patches > >> when packaging (which would have been my pragmatic approa

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Martin Landa
2014-04-13 17:03 GMT+02:00 Moritz Lennert : > On 11/04/14 13:05, Martin Landa wrote: > I don't think this a very helpful attitude. This whole debate is not about > one bad guy keeping the rest of the good guys from moving forward. First of > all, Glynn is not alone in his position. nobody is sayin

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Benjamin Ducke
On 13/04/14 17:03, Moritz Lennert wrote: [...] > > I don't think this a very helpful attitude. This whole debate is not > about one bad guy keeping the rest of the good guys from moving forward. > First of all, Glynn is not alone in his position. > I agree. I tend to take a conservative view,

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-13 Thread Moritz Lennert
On 11/04/14 13:05, Martin Landa wrote: Hi Jurgen, 2014-04-11 12:42 GMT+02:00 Jürgen E. : although the architecture may differ, we may get some inspiration for python windows handling from other GIS projects like QGIS? in QGIS python is also in heavy use, e.g. QGIS processing framework, python

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-12 Thread Helmut Kudrnovsky
>thanks also for the link! that's all about we're discussing here. > >Python Launcher just forgotten, some ugly tests for Python Launcher: http://trac.osgeo.org/grass/ticket/2015#comment:6 - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Handling

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-12 Thread Helmut Kudrnovsky
Hi Jürgen, > Hi Helmut, [...] > Not sure if I want to participate in this thread. thanks for sharing your experience anyway. > I think a system installation of python is uncommon. yes I'm also thinking so if windows comes in ... [...] >And >thereby avoid having special treatment for .py scr

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-11 Thread Glynn Clements
Helmut Kudrnovsky wrote: > although the architecture may differ, we may get some inspiration for python > windows handling from other GIS projects like QGIS? > > in QGIS python is also in heavy use, e.g. QGIS processing framework, python > addons, integrated python shell, etc. AFAIK they're bun

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-11 Thread Martin Landa
Hi Jurgen, 2014-04-11 12:42 GMT+02:00 Jürgen E. : >> although the architecture may differ, we may get some inspiration for python >> windows handling from other GIS projects like QGIS? >> >> in QGIS python is also in heavy use, e.g. QGIS processing framework, python >> addons, integrated python s

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-11 Thread Jürgen E . Fischer
Hi Helmut, On Thu, 10. Apr 2014 at 14:34:04 -0700, Helmut Kudrnovsky wrote: > although the architecture may differ, we may get some inspiration for python > windows handling from other GIS projects like QGIS? > > in QGIS python is also in heavy use, e.g. QGIS processing framework, python > addon

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-10 Thread Helmut Kudrnovsky
[...] >> GRASS 6 creates a .bat file for each shell script. > >And this .bat file specifies the script interpreter. Looks like a good >solution to also select the correct Python version. [...] >Other projects also bypass the standard execution mechanism of python >scripts, and they work just fine

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-09 Thread Glynn Clements
Vaclav Petras wrote: > > And this .bat file specifies the script interpreter. Looks like a good > > solution to also select the correct Python version. > > > I'm afraid how will work for user scripts. Typical case will be that user > has some Python, so he or she will try to run from outside if

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-09 Thread Glynn Clements
Markus Metz wrote: > > In spite of wxGUI, GRASS remains fundamentally a collection of > > command-line modules, more like a library than an application. > > I make use of this property daily. On MS Windows, GRASS should by > default behave like a stand-alone application. You can make use of the

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-09 Thread Glynn Clements
Markus Metz wrote: > > I basically agree with user expectations you stated. But I would like to > > note that recently, I met several users which wanted and expected that GRASS > > script will run outside GRASS without any special environment setup in the > > script itself. > > AFAIK, GRASS scri

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-09 Thread Vaclav Petras
On Wed, Apr 9, 2014 at 2:16 AM, Markus Metz wrote: > On Wed, Apr 9, 2014 at 3:44 AM, Glynn Clements > wrote: > > > > Markus Metz wrote: > > > >> > All of this goes out the window if you want to provide a command-line > >> > environment, whether an interactive shell or the ability to execute > >>

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-09 Thread Moritz Lennert
On 09/04/14 08:16, Markus Metz wrote: On Wed, Apr 9, 2014 at 3:44 AM, Glynn Clements wrote: [...] In spite of wxGUI, GRASS remains fundamentally a collection of command-line modules, more like a library than an application. I make use of this property daily. On MS Windows, GRASS should by de

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-08 Thread Markus Metz
On Wed, Apr 9, 2014 at 3:44 AM, Glynn Clements wrote: > > Markus Metz wrote: > >> > All of this goes out the window if you want to provide a command-line >> > environment, whether an interactive shell or the ability to execute >> > commands via system() or CreateProcess(). >> >> It works in GRASS

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-08 Thread Markus Metz
On Tue, Apr 8, 2014 at 11:23 PM, Vaclav Petras wrote: > > On Tue, Apr 8, 2014 at 3:22 PM, Markus Metz > wrote: >> >> IMHO, what you say is that GRASS and MS Windows are incompatible by >> principle, and you will not succeed in making MS Windows compatible >> with these GRASS principles. I assume

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-08 Thread Glynn Clements
Vaclav Petras wrote: > I basically agree with user expectations you stated. But I would like to > note that recently, I met several users which wanted and expected that > GRASS script will run outside GRASS without any special environment setup > in the script itself. Perhaps, ArcGIS sets the env

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-08 Thread Glynn Clements
Markus Metz wrote: > > All of this goes out the window if you want to provide a command-line > > environment, whether an interactive shell or the ability to execute > > commands via system() or CreateProcess(). > > It works in GRASS 6 with shell scripts. I am sure the same mechanism > will work

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-08 Thread Vaclav Petras
On Tue, Apr 8, 2014 at 3:22 PM, Markus Metz wrote: > IMHO, what you say is that GRASS and MS Windows are incompatible by > principle, and you will not succeed in making MS Windows compatible > with these GRASS principles. I assume WinGRASS users expect a typical > MS Windows software like clicking

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-04-08 Thread Markus Metz
On Thu, Mar 6, 2014 at 10:08 AM, Glynn Clements wrote: > > Markus Metz wrote: > >> > .py is supposed to be associated with a Python interpreter, and >> > the stock Python installer will do that. >> >> .py is not supposed to be associated with a Python interpreter that is >> installed system-wide >

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-03-06 Thread Glynn Clements
Markus Metz wrote: > > .py is supposed to be associated with a Python interpreter, and > > the stock Python installer will do that. > > .py is not supposed to be associated with a Python interpreter that is > installed system-wide It certainly is, because that's what the stock Python installer

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-03-05 Thread Markus Metz
On Wed, Feb 19, 2014 at 3:56 PM, Glynn Clements wrote: > > Markus Metz wrote: > >> >> > It's fairly trivial to set a valid GRASS environment globally, so that >> >> > commands are usable in any shell. That's how I've had it on Linux >> >> > since roughly forever; I don't run the grass70 script unl

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-19 Thread Glynn Clements
Markus Metz wrote: > >> > It's fairly trivial to set a valid GRASS environment globally, so that > >> > commands are usable in any shell. That's how I've had it on Linux > >> > since roughly forever; I don't run the grass70 script unless I'm > >> > testing it. > >> > >> At the very least, GRASS n

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-18 Thread Markus Metz
On Tue, Feb 11, 2014 at 5:39 PM, Glynn Clements wrote: > > Markus Metz wrote: > >> This is the fundamental difference and the reason why using a >> system-wide Python can only cause trouble on Windows. On Windows, a >> software package typically includes everything it needs to run, > > On Windows,

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-15 Thread Vaclav Petras
On Fri, Feb 14, 2014 at 3:41 AM, Enrico Gallo wrote: > Dear list, > > in my very limited experience, the same Python script for GRASS always > runs without problems inside QGIS-GRASS Processing Plugin but > sometimes fails in GRASS Enviroment, if other Python are installed on > the PC (Stand alone

[GRASS-dev] Handling of Python scripts on MS Windows

2014-02-14 Thread Enrico Gallo
Dear list, in my very limited experience, the same Python script for GRASS always runs without problems inside QGIS-GRASS Processing Plugin but sometimes fails in GRASS Enviroment, if other Python are installed on the PC (Stand alone, ARCGIS) Could be QGIS-GRASS Processing Initialization investiga

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-11 Thread Glynn Clements
Markus Metz wrote: > This is the fundamental difference and the reason why using a > system-wide Python can only cause trouble on Windows. On Windows, a > software package typically includes everything it needs to run, On Windows, a software package is typically a monolithic executable with no a

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-11 Thread Glynn Clements
Benjamin Ducke wrote: > How would users choose mapsets or create new ones in this > scenario? With g.mapset. > > Things get marginally more complex if you either need multiple > > versions installed concurrently, or multiple concurrent sessions. > > > > The former is seldom supported, particul

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Markus Metz
On Mon, Feb 10, 2014 at 8:29 PM, Vaclav Petras wrote: > > > > On Mon, Feb 10, 2014 at 2:17 PM, Markus Metz > wrote: >> >> On Mon, Feb 10, 2014 at 6:44 PM, Vaclav Petras >> wrote: >> > >> > >> > >> > On Mon, Feb 10, 2014 at 8:41 AM, Markus Metz >> > >> > wrote: >> >> >> >> On Mon, Feb 10, 2014 a

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Vaclav Petras
On Mon, Feb 10, 2014 at 2:17 PM, Markus Metz wrote: > On Mon, Feb 10, 2014 at 6:44 PM, Vaclav Petras > wrote: > > > > > > > > On Mon, Feb 10, 2014 at 8:41 AM, Markus Metz < > markus.metz.gisw...@gmail.com> > > wrote: > >> > >> On Mon, Feb 10, 2014 at 12:04 PM, Moritz Lennert > >> wrote: > >> > O

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Markus Metz
On Mon, Feb 10, 2014 at 6:44 PM, Vaclav Petras wrote: > > > > On Mon, Feb 10, 2014 at 8:41 AM, Markus Metz > wrote: >> >> On Mon, Feb 10, 2014 at 12:04 PM, Moritz Lennert >> wrote: >> > On 10/02/14 11:46, Markus Metz wrote: >> >> >> >> On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky >> >> w

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Helmut Kudrnovsky
> And we were not able to explain why the right Python (or Python DLL) is used at one point but not the other. it's maybe a path issue (?). http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/path.mspx?mfr=true "The operating system always searches in the current dire

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Helmut Kudrnovsky
wenzeslaus wrote > If I remember correctly, Python scripts were not working from Python > scripts, they were working from command line. And we were not able to > explain why the right Python (or Python DLL) is used at one point but not > the other. If there wouldn't be shell=True [1], I would say t

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Helmut Kudrnovsky
>GRASS Python scripts are currently executed using the system-wide >installed Python if it exists. No attempt has been made to explicitly >use GRASS_PYTHON, therefore it is not possible to say if the system's >Python would really be completely ignored. it is (partly) implemented ( and tested on W

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Vaclav Petras
On Mon, Feb 10, 2014 at 8:41 AM, Markus Metz wrote: > On Mon, Feb 10, 2014 at 12:04 PM, Moritz Lennert > wrote: > > On 10/02/14 11:46, Markus Metz wrote: > >> > >> On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky > wrote: > > > > Therefore we need > > hard-coded special treatment

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Markus Metz
On Mon, Feb 10, 2014 at 12:04 PM, Moritz Lennert wrote: > On 10/02/14 11:46, Markus Metz wrote: >> >> On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky wrote: > > Therefore we need > hard-coded special treatment for shell and Python scripts in order to > make sure that the corre

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Moritz Lennert
On 10/02/14 11:46, Markus Metz wrote: On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky wrote: Therefore we need hard-coded special treatment for shell and Python scripts in order to make sure that the correct interpreter is used. Just for my understanding: When you say hard-coded special

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Markus Metz
On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky wrote: >>>Therefore we need >>> hard-coded special treatment for shell and Python scripts in order to >>> make sure that the correct interpreter is used. > >>Just for my understanding: When you say hard-coded special treatment for >>shell scripts

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Helmut Kudrnovsky
>>Therefore we need >> hard-coded special treatment for shell and Python scripts in order to >> make sure that the correct interpreter is used. >Just for my understanding: When you say hard-coded special treatment for >shell scripts, are you speaking about the .bat files ? I think yes. -

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Moritz Lennert
On 10/02/14 09:57, Markus Metz wrote: Glynn Clements wrote: This is my entire point. But that cannot be achieved if you're relying upon hard-coded special treatment for Python scripts. If Python scripts cannot simply be executed (via system() or subprocess.Popen() or whatever) in the same manner

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-10 Thread Markus Metz
Glynn Clements wrote: > > Markus Metz wrote: > >> >> Other projects such as gimp or libreoffice are AFAICT reasonably >> >> bundled with Python, without a Python installer. >> > >> > They aren't attempting to support Python scripts as stand-alone >> > programs (i.e. something which can be run from

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-08 Thread Helmut Kudrnovsky
hi, > But there are also downsides to this: We would need to think about > different mechanisms for each supported OS; we could get tangled up in > all sorts of flawed decisions by the OS designers; I think we are already there regarding MS windos OS and python ... >Whatever the decision may be:

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-08 Thread Benjamin Ducke
On 08/02/14 20:41, Glynn Clements wrote: > > Markus Neteler wrote: > >>> The difference is that you don't "start" GRASS. You set the required >>> environment variables from e.g. ~/.profile so that GRASS commands work >>> in any shell (or via any other execution mechanism, e.g. M-! from >>> within

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-08 Thread Glynn Clements
Markus Neteler wrote: > > The difference is that you don't "start" GRASS. You set the required > > environment variables from e.g. ~/.profile so that GRASS commands work > > in any shell (or via any other execution mechanism, e.g. M-! from > > within Emacs). > > This is hardly feasible for the m

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-07 Thread Markus Neteler
On Fri, Feb 7, 2014 at 5:49 PM, Glynn Clements wrote: > > Markus Neteler wrote: > >> > It's fairly trivial to set a valid GRASS environment globally, so that >> > commands are usable in any shell. That's how I've had it on Linux >> > since roughly forever; I don't run the grass70 script unless I'm

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-07 Thread Vaclav Petras
On Fri, Feb 7, 2014 at 11:49 AM, Glynn Clements wrote: > > Markus Neteler wrote: > > > > It's fairly trivial to set a valid GRASS environment globally, so that > > > commands are usable in any shell. That's how I've had it on Linux > > > since roughly forever; I don't run the grass70 script unless

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-07 Thread Glynn Clements
Markus Neteler wrote: > > It's fairly trivial to set a valid GRASS environment globally, so that > > commands are usable in any shell. That's how I've had it on Linux > > since roughly forever; I don't run the grass70 script unless I'm > > testing it. > > > > FWIW, I want to make that the default

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-06 Thread Markus Neteler
On Wed, Feb 5, 2014 at 5:19 PM, Glynn Clements wrote: ... > It's fairly trivial to set a valid GRASS environment globally, so that > commands are usable in any shell. That's how I've had it on Linux > since roughly forever; I don't run the grass70 script unless I'm > testing it. > > FWIW, I want t

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-06 Thread Helmut Kudrnovsky
Glynn Clements wrote > Markus Metz wrote: > >> >> Other projects such as gimp or libreoffice are AFAICT reasonably >> >> bundled with Python, without a Python installer. >> > >> > They aren't attempting to support Python scripts as stand-alone >> > programs (i.e. something which can be run from th

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-05 Thread Glynn Clements
Markus Metz wrote: > >> Other projects such as gimp or libreoffice are AFAICT reasonably > >> bundled with Python, without a Python installer. > > > > They aren't attempting to support Python scripts as stand-alone > > programs (i.e. something which can be run from the command prompt, > > batch f

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-05 Thread Glynn Clements
Vaclav Petras wrote: > > But with the > > latest Python developments, it will be a real challenge to > > integrate GRASS 7 in the same way that we could integrate > > GRASS 6 into a "host" application (i.e. without messing > > around with any system settings). > > Can you be more specific? It so

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-04 Thread Markus Neteler
On Tue, Feb 4, 2014 at 10:08 PM, Markus Metz wrote: ... > We should use the embedded Python explicitly to avoid this problem. We > were here already. From a user's perspective, the easiest would be if > GRASS ignores any system-wide Python installation. This view is IMHO already confirmed by the

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-04 Thread Markus Metz
On Tue, Feb 4, 2014 at 11:29 AM, Glynn Clements wrote: > > Markus Metz wrote: > >> Other projects such as gimp or libreoffice are AFAICT reasonably >> bundled with Python, without a Python installer. > > They aren't attempting to support Python scripts as stand-alone > programs (i.e. something whi

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-04 Thread Benjamin Ducke
On 04/02/14 16:42, Vaclav Petras wrote: > > > > On Tue, Feb 4, 2014 at 10:14 AM, Benjamin Ducke > wrote: > > On 04/02/14 15:09, Vaclav Petras wrote: > > > > On Tue, Feb 4, 2014 at 8:25 AM, Benjamin Ducke > mailto:bendu...@fastmail.fm> > >

Re: [GRASS-dev] Handling of Python scripts on MS Windows

2014-02-04 Thread Vaclav Petras
On Tue, Feb 4, 2014 at 10:14 AM, Benjamin Ducke wrote: > On 04/02/14 15:09, Vaclav Petras wrote: > > > > On Tue, Feb 4, 2014 at 8:25 AM, Benjamin Ducke > > wrote: > > > > But with the > > latest Python developments, it will be a real challenge to > > integ

  1   2   >