Send grass-windows mailing list submissions to grass-windows@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/grass-windows or, via email, send a message with subject or body 'help' to grass-windows-requ...@lists.osgeo.org You can reach the person managing the list at grass-windows-ow...@lists.osgeo.org When replying, please edit your Subject line so it is more specific than "Re: Contents of grass-windows digest..." Today's Topics: 1. Re: Python collections module (Glynn Clements) 2. Re: Python collections module (Frank Broniewski) 3. Re: Python collections module (Glynn Clements) 4. Re: Python collections module (Luigi Ponti) ---------------------------------------------------------------------- Message: 1 Date: Mon, 8 Feb 2010 20:11:45 +0000 From: Glynn Clements <gl...@gclements.plus.com> Subject: Re: [GRASS-windows] Python collections module To: "Frank Broniewski" <b...@metrico.lu> Cc: grass-windows <grass-windows@lists.osgeo.org> Message-ID: <19312.28673.550981.963...@cerise.gclements.plus.com> Content-Type: text/plain; charset=us-ascii Frank Broniewski wrote: > I am using the osgeo4w installation and I want to use the python scripting > possibilities. > When I try to import the grass module I get an ImportError "No module named > collections" from "C:\OSGeo4W\apps\Python25\lib\threading.py". > And indeed there is no collections.py. When I look into my Python26 > installation dir, there is a collections.py in Python26\Lib. Is the osgeo4w > python package broken? Reinstalling does not fix the missing collections > module. > I appreciate any help with this problem The Python documentation says that the collections module was added in 2.4. I have both Python 2.5 and Python 2.6 installed on Windows (both are the stock python.org versions). 2.5 doesn't have a collections.py, but "import collections" works from the IDE. AFAICT, the collections module is built into python25.dll. -- Glynn Clements <gl...@gclements.plus.com> ------------------------------ Message: 2 Date: Tue, 9 Feb 2010 08:03:21 +0100 From: "Frank Broniewski" <b...@metrico.lu> Subject: Re: [GRASS-windows] Python collections module To: "Glynn Clements" <gl...@gclements.plus.com> Cc: grass-windows <grass-windows@lists.osgeo.org> Message-ID: <b78161a7e476417498fff0fb370f4...@pcfl01brfr> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Hello, Thanks for your answer, Glynn. I don't find a python25.dll in my stock installation, but it works too. I am just a little bit worried that the shipped version from the osgeo4w installer doesn't work as expected. When I replace the osgeo4w version with the stock version everything works. Can someone confirm this? Sample code to reproduce my error: test.py -------------- import sys import os import grass.script as grass gives me the below mentioned error. It's because Python25/Lib/threading.py does: from collections import deque. Now I wonder if I should report this as a bug, because reinstalling osgeo4w doesn't solve the problem. If someone can confirm this I would report it, but I hesitate. I will test this behavior on another installation today and I will see if I encounter this error message again. Many thanks Frank -------------------------------------------------- From: "Glynn Clements" <gl...@gclements.plus.com> Sent: Monday, February 08, 2010 9:11 PM To: "Frank Broniewski" <b...@metrico.lu> Cc: "grass-windows" <grass-windows@lists.osgeo.org> Subject: Re: [GRASS-windows] Python collections module > > Frank Broniewski wrote: > >> I am using the osgeo4w installation and I want to use the python >> scripting >> possibilities. >> When I try to import the grass module I get an ImportError "No module >> named >> collections" from "C:\OSGeo4W\apps\Python25\lib\threading.py". >> And indeed there is no collections.py. When I look into my Python26 >> installation dir, there is a collections.py in Python26\Lib. Is the >> osgeo4w >> python package broken? Reinstalling does not fix the missing collections >> module. >> I appreciate any help with this problem > > The Python documentation says that the collections module was added in > 2.4. > > I have both Python 2.5 and Python 2.6 installed on Windows (both are > the stock python.org versions). 2.5 doesn't have a collections.py, but > "import collections" works from the IDE. AFAICT, the collections > module is built into python25.dll. > > -- > Glynn Clements <gl...@gclements.plus.com> ------------------------------ Message: 3 Date: Tue, 9 Feb 2010 08:58:56 +0000 From: Glynn Clements <gl...@gclements.plus.com> Subject: Re: [GRASS-windows] Python collections module To: "Frank Broniewski" <b...@metrico.lu> Cc: grass-windows <grass-windows@lists.osgeo.org> Message-ID: <19313.9168.72246.483...@cerise.gclements.plus.com> Content-Type: text/plain; charset=us-ascii Frank Broniewski wrote: > Thanks for your answer, Glynn. I don't find a python25.dll in my stock > installation, but it works too. I am just a little bit worried that the > shipped version from the osgeo4w installer doesn't work as expected. When I > replace the osgeo4w version with the stock version everything works. > > Can someone confirm this? Sample code to reproduce my error: I can't test as I don't have a recent version of OSGeo4W here. > Now I wonder if I should report this as a bug, because reinstalling osgeo4w > doesn't solve the problem. If someone can confirm this I would report it, > but I hesitate. I will test this behavior on another installation today and > I will see if I encounter this error message again. If stock Python works and OSGeo4W's version doesn't, that suggests a bug in OSGeo4W's version. However, building a working installer for Windows is easier said than done due to its DLL search order (in short, the only way to ensure that your version of a particular DLL is used is to use manifests, which is a relatively new feature). -- Glynn Clements <gl...@gclements.plus.com> ------------------------------ Message: 4 Date: Tue, 09 Feb 2010 11:23:13 +0100 From: Luigi Ponti <lpo...@infinito.it> Subject: Re: [GRASS-windows] Python collections module To: Frank Broniewski <b...@metrico.lu> Cc: Glynn Clements <gl...@gclements.plus.com>, grass-windows <grass-windows@lists.osgeo.org> Message-ID: <4b713791.2070...@infinito.it> Content-Type: text/plain; charset=ISO-8859-3; format=flowed On 09/02/2010 08:03, Frank Broniewski wrote: > Hello, > > Thanks for your answer, Glynn. I don't find a python25.dll in my stock > installation, but it works too. I am just a little bit worried that > the shipped version from the osgeo4w installer doesn't work as > expected. When I replace the osgeo4w version with the stock version > everything works. > > Can someone confirm this? Sample code to reproduce my error: > test.py > -------------- > import sys > import os > import grass.script as grass > > gives me the below mentioned error. It's because > Python25/Lib/threading.py does: > from collections import deque. Hi, This is what I get on my osgeo4w grass: GRASS 6.4.0svn (AEA_US)> python --version Python 2.5.2 GRASS 6.4.0svn (AEA_US)> python test.py Traceback (most recent call last): File "test.py", line 3, in <module> import grass.script as grass ImportError: No module named grass.script Regards, Luigi > > Now I wonder if I should report this as a bug, because reinstalling > osgeo4w doesn't solve the problem. If someone can confirm this I would > report it, but I hesitate. I will test this behavior on another > installation today and I will see if I encounter this error message > again. > > Many thanks > > Frank > > -------------------------------------------------- > From: "Glynn Clements" <gl...@gclements.plus.com> > Sent: Monday, February 08, 2010 9:11 PM > To: "Frank Broniewski" <b...@metrico.lu> > Cc: "grass-windows" <grass-windows@lists.osgeo.org> > Subject: Re: [GRASS-windows] Python collections module > >> >> Frank Broniewski wrote: >> >>> I am using the osgeo4w installation and I want to use the python >>> scripting >>> possibilities. >>> When I try to import the grass module I get an ImportError "No >>> module named >>> collections" from "C:\OSGeo4W\apps\Python25\lib\threading.py". >>> And indeed there is no collections.py. When I look into my Python26 >>> installation dir, there is a collections.py in Python26\Lib. Is the >>> osgeo4w >>> python package broken? Reinstalling does not fix the missing >>> collections >>> module. >>> I appreciate any help with this problem >> >> The Python documentation says that the collections module was added in >> 2.4. >> >> I have both Python 2.5 and Python 2.6 installed on Windows (both are >> the stock python.org versions). 2.5 doesn't have a collections.py, but >> "import collections" works from the IDE. AFAICT, the collections >> module is built into python25.dll. >> >> -- >> Glynn Clements <gl...@gclements.plus.com> > > _______________________________________________ > grass-windows mailing list > grass-windows@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-windows > ------------------------------ _______________________________________________ grass-windows mailing list grass-windows@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-windows End of grass-windows Digest, Vol 42, Issue 3 ********************************************