From dpinte at itae.be Tue Aug 1 18:47:11 2006 From: dpinte at itae.be (Didrik Pinte) Date: Tue, 01 Aug 2006 18:47:11 +0200 Subject: Thuban/UI/main.py : import problem Message-ID: <1154450832.4427.82.camel@geru-itae> Hi, I suppose some of you are on vacation. For my part, i'm back working on Thuban for the next months. When subclassing ThubanApplication in order to customize Thuban (splashscreen etc.), I'm facing a little problem of imports When launching my application, I got the following error : did at geru-itae:~/Documents/ucl/alert/python$ python alert/main.py Traceback (most recent call last): File "alert/main.py", line 9, in ? from alert.ui.application import AlertApplication File "/home/did/Documents/ucl/alert/python/alert/ui/application.py", line 15, in ? from Thuban.UI import application File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/application.py", line 37, in ? import mainwindow File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/mainwindow.py", line 39, in ? import tableview, identifyview File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/identifyview.py", line 19, in ? import main File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/main.py", line 18, in ? from application import ThubanApplication ImportError: cannot import name ThubanApplication I don't understand where is the problem exactly. According to PEP-8, it is best to have only absolute imports. So i've changed the Thuban/UI/main.py import to the following : < from application import ThubanApplication > from Thuban.UI.application import ThubanApplication but this crashes with the same error : did at geru-itae:~/Documents/ucl/alert/python$ python alert/main.py Traceback (most recent call last): File "alert/main.py", line 9, in ? from alert.ui.application import AlertApplication File "/home/did/Documents/ucl/alert/python/alert/ui/application.py", line 15, in ? from Thuban.UI import application File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/application.py", line 37, in ? import mainwindow File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/mainwindow.py", line 39, in ? import tableview, identifyview File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/identifyview.py", line 19, in ? import main File "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/main.py", line 18, in ? from Thuban.UI.application import ThubanApplication ImportError: cannot import name ThubanApplication Finallly, I got it to work by changing the imports and the code like this : < from application import ThubanApplication > import application < app = ThubanApplication(0) > app = application.ThubanApplication(0) So, two questions : [1] Do someone know the why of the errors ? [2] What is the best way to allow the subclassing of ThubanApplication ? [3] What about PEP-8 and the fact that it does not work ? Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060801/d613cf32/attachment.bin From bernhard.herzog at intevation.de Tue Aug 1 19:39:32 2006 From: bernhard.herzog at intevation.de (Bernhard Herzog) Date: Tue, 1 Aug 2006 19:39:32 +0200 Subject: Thuban/UI/main.py : import problem In-Reply-To: <1154450832.4427.82.camel@geru-itae> References: <1154450832.4427.82.camel@geru-itae> Message-ID: <200608011939.36733.bernhard.herzog@intevation.de> Hi, On Tuesday 01 August 2006 18:47, Didrik Pinte wrote: > When subclassing ThubanApplication in order to customize Thuban > (splashscreen etc.), I'm facing a little problem of imports If you'd like to have some example code for this, have a look at http://great-er.intevation.org/ [...] > "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/application.py", > line 37, in ? > import mainwindow [...] > line 18, in ? > from application import ThubanApplication > ImportError: cannot import name ThubanApplication [...] > I don't understand where is the problem exactly. There's a recursive import. Why it fails is described in some detail here: http://effbot.org/zone/import-confusion.htm#recursive-imports > According to PEP-8, it is best to have only absolute imports. Absolute imports have nothing to do with this. > Finallly, I got it to work by changing the imports and the code like > this : In main.py, I guess. > < from application import ThubanApplication > > > import application > > < app = ThubanApplication(0) > > > app = application.ThubanApplication(0) Looks good. Could you apply this change and check it in? > [2] What is the best way to allow the subclassing of ThubanApplication ? I'm not sure exactly what you are asking here. Can you elaborate a bit? Bernhard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060801/94bd4ca8/attachment.bin From dpinte at itae.be Wed Aug 2 10:21:32 2006 From: dpinte at itae.be (Didrik Pinte) Date: Wed, 02 Aug 2006 10:21:32 +0200 Subject: Thuban/UI/main.py : import problem In-Reply-To: <200608011939.36733.bernhard.herzog@intevation.de> References: <1154450832.4427.82.camel@geru-itae> <200608011939.36733.bernhard.herzog@intevation.de> Message-ID: <1154506892.4427.99.camel@geru-itae> Le mardi 01 ao?t 2006 ? 19:39 +0200, Bernhard Herzog a ?crit : > [...] > > "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/application.py", > > line 37, in ? > > import mainwindow > [...] > > line 18, in ? > > from application import ThubanApplication > > ImportError: cannot import name ThubanApplication > [...] > > I don't understand where is the problem exactly. > > There's a recursive import. Why it fails is described in some detail here: > http://effbot.org/zone/import-confusion.htm#recursive-imports Thank you for the link. That was pretty obvious. > In main.py, I guess. > > > < from application import ThubanApplication > > > > > import application > > > > < app = ThubanApplication(0) > > > > > app = application.ThubanApplication(0) > > Looks good. Could you apply this change and check it in? For sure. > > [2] What is the best way to allow the subclassing of ThubanApplication ? > > I'm not sure exactly what you are asking here. Can you elaborate a bit? Reading the docstrings of ThubanApplication, I was thinking that subclassing it would work directly. Then I faced the problem described in this post and did not realize it was a problem a circular imports (i'm a bit tired ... ;-)). So the question came and has no sense at all. If we fix the import problem, everything works as expected. Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060802/5752f5f2/attachment.bin From thuban-bugs at wald.intevation.org Thu Aug 3 12:19:19 2006 From: thuban-bugs at wald.intevation.org (thuban-bugs@wald.intevation.org) Date: Thu, 3 Aug 2006 12:19:19 +0200 (CEST) Subject: =?UTF-8?B?W3RodWJhbi1CdWdzXVsxNzNdIHBvc3RnaXMgdGVzY2FzZSBub3QgdXNhYmxlIHdpdGggcmVjZW50IGRlYmlhbiBzeXN0ZW1z?= Message-ID: <20060803101919.1EDED18017E4@pyrosoma.intevation.org> Bugs item #173, was opened at 2006-08-03 12:19 You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=105&aid=173&group_id=6 Or by replying to this e-mail entering your response between the following markers: #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ (enter your response here) #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ Status: Open Priority: 1 Submitted By: Didrik Pinte (dpinte) Assigned to: Nobody (None) Summary: postgis tescase not usable with recent debian systems Resolution: None Version: None Category: None Initial Comment: The postgis testcase rely on the existance of the pg_ctl command. Since the new clustered version of the postgres packages, the pg_ctl command is wrapped inside pg_ctlcluster. ---------------------------------------------------------------------- You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=105&aid=173&group_id=6 From jan-oliver.wagner at intevation.de Thu Aug 3 21:53:49 2006 From: jan-oliver.wagner at intevation.de (Jan-Oliver Wagner) Date: Thu, 3 Aug 2006 21:53:49 +0200 Subject: Fwd: Bug#380971: Python transition (#2): you are building a private python module ! Message-ID: <200608032153.50065.jan-oliver.wagner@intevation.de> Hi, Debian experts: Do you know whats is going on there? Jan -- Jan-Oliver Wagner: www.intevation.de/~jan | GISpatcher: www.gispatcher.de Kolab Konsortium : www.kolab-konsortium.de | Thuban : thuban.intevation.org Intevation GmbH : www.intevation.de | Kolab : www.kolab.org FreeGIS : www.freegis.org | GAV : www.grass-verein.de -------------- next part -------------- An embedded message was scrubbed... From: madcoder-python-transition at debian.org Subject: Bug#380971: Python transition (#2): you are building a private python module ! Date: Tue, 1 Aug 2006 12:32:49 +0200 (CEST) Size: 4308 Url: http://www.intevation.de/pipermail/thuban-devel/attachments/20060803/f1becda7/attachment.txt From dpinte at itae.be Mon Aug 7 10:41:30 2006 From: dpinte at itae.be (Didrik Pinte) Date: Mon, 07 Aug 2006 10:41:30 +0200 Subject: thuban and encodings on utf-8 systems Message-ID: <1154940090.16065.84.camel@geru-itae> Hi, I had a problem displaying iso-8859-1 shapefiles on a debian utf-8 system (see http://wald.intevation.org/tracker/index.php?func=detail&aid=118&group_id=6&atid=105 ) I've made a little patch to support it but it's iso-8859-1 bounded. What are the encodings that Thuban wants to support ? And what is the policy when reading files with an unsupported encoding ? What about the patch ? Is there a cleaner way to do that ? Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/00edde0c/attachment.bin From bwindridge at gmail.com Mon Aug 7 00:46:37 2006 From: bwindridge at gmail.com (Barry Windridge) Date: Mon, 7 Aug 2006 08:46:37 +1000 Subject: Thuban Extensions for measuring distance, area and making selections based on user drawn shapes Message-ID: Hi There are 5 Thuban extensions attached to this email: ruler.py measures distances and displays the distance in the status bar for user drawn lines area.py measures area and perimeter and displays this data in the status bar for user drawn polygons selectByRectangle.py will select features completely contained within a user drawn rectangle selectByCircle.py will select features completely contained within a user drawn circle selectByPolygon.py will select features completely contained within a user drawn polygon BW_Utilities.py is used by the ruler and selectByPolygon tools. The following Thuban files (attached) have been modified for use with the above tools: mainwindow.py view.py viewport.py The changes are documented with comments commencing with: # BW .. The changes fall into two categories: 1) The existing Thuban files create a 'drag' environment. The changes allow a tool to utilise a 'draw' environment instead. A tool can use the existing drag environment (default) or the 'draw' environment. 2) The status bar has been divided into two sections - the right hand section is used to display coordinates of the mouse when it is over the map window and the left hand section is used to display status text. The set up of the status bar has also been changed slightly to facilitate modification by tools - for example to allow a tool to create a third section on the tool bar. Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: area.py Type: text/x-python Size: 4179 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/area.py -------------- next part -------------- A non-text attachment was scrubbed... Name: ruler.py Type: text/x-python Size: 3540 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/ruler.py -------------- next part -------------- A non-text attachment was scrubbed... Name: selectByRectangle.py Type: text/x-python Size: 7742 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/selectByRectangle.py -------------- next part -------------- A non-text attachment was scrubbed... Name: selectByCircle.py Type: text/x-python Size: 9735 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/selectByCircle.py -------------- next part -------------- A non-text attachment was scrubbed... Name: selectByPolygon.py Type: text/x-python Size: 9333 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/selectByPolygon.py -------------- next part -------------- A non-text attachment was scrubbed... Name: BW_Utilities.py Type: text/x-python Size: 3946 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/BW_Utilities.py -------------- next part -------------- A non-text attachment was scrubbed... Name: mainwindow.py Type: text/x-python Size: 54215 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/mainwindow.py -------------- next part -------------- A non-text attachment was scrubbed... Name: view.py Type: text/x-python Size: 17064 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/view.py -------------- next part -------------- A non-text attachment was scrubbed... Name: viewport.py Type: text/x-python Size: 36173 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060807/164d2cfd/viewport.py From dpinte at itae.be Thu Aug 10 08:12:20 2006 From: dpinte at itae.be (Didrik Pinte) Date: Thu, 10 Aug 2006 08:12:20 +0200 Subject: Thuban Extensions for measuring distance, area and making selections based on user drawn shapes In-Reply-To: References: Message-ID: <1155190340.5424.72.camel@geru-itae> Hi Barry, Great tools, i'll try to test them a lot in the next weeks. Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060810/8d93c270/attachment.bin From bwindridge at gmail.com Mon Aug 14 03:31:58 2006 From: bwindridge at gmail.com (Barry Windridge) Date: Mon, 14 Aug 2006 11:31:58 +1000 Subject: Thuban Extensions for measuring distance, area and making selections based on user drawn shapes In-Reply-To: <1155190340.5424.72.camel@geru-itae> References: <1155190340.5424.72.camel@geru-itae> Message-ID: Hi Didrik Here are some issues that I am aware of with the selection tools: 1) The tools only search through the first part of multi-part shapes. That is, the selection may fail to pick up multi part shapes or kick up a multi part shape tht is only partly enclosed in the slection shape. 2) the select by polygon tool only checks if all points of a shape are inside the drawn polygon. Hence it will fail if a concave part of the polygon intersects a segment of the shape without excluding any point in the shape. These issues and any other issues that are identified will be fixed in the next issue of these tools which will most likely include the features of phase 2 listed below. Proposed features of phase two of the selection tools: 1) Fix errors in existing versions. 2) Extend tools to handle shapes that intersect the drawn graphics. 3) Create a dialog box that allows users to select whether a tool will select shapes contained within the drawn shape or shapes that intersect the drawn shape. 4) The same dialog box will also allow the user also select whether using the selection tools will (for a layer): i) create a new selection, ii) add to the existing selection, iii) remove shapes from the exisiting selection, 4) Make the "selection" a property of the layer. This will allow multiple layers to have selections. As part of this the popup menu displayed when a user right mouse clicks on a layer in the legend will include options to: i) clear the existing selection for the layer, ii) invert the existing selection, iii) select all fetures in a layer, 5) Make the following selection display attributes properties of the layer: i) selection stroke colour, ii) selection fill colour, iii) selection stroke width, iv) selection fill pattern, 6) Exend the layer properties dialog to to allow the user to set the selection display attributes. 7) Save & restore selection display attributes as part of the layer attributes in the session file. On 8/10/06, Didrik Pinte wrote: > Hi Barry, > > Great tools, i'll try to test them a lot in the next weeks. > > Didrik > > > _______________________________________________ > Thuban-devel mailing list > Thuban-devel at intevation.de > https://intevation.de/mailman/listinfo/thuban-devel > > > > From jan-oliver.wagner at intevation.de Fri Aug 18 08:49:31 2006 From: jan-oliver.wagner at intevation.de (Jan-Oliver Wagner) Date: Fri, 18 Aug 2006 08:49:31 +0200 Subject: Fwd: Bug#383145: Recommends unavailable libgdal1-1.3.1 Message-ID: <200608180849.33069.jan-oliver.wagner@intevation.de> Hi, I saw this bug report from Debian. Sounds like this might be a show stopper for Etch. Debian experts: Is my assumption correct? Wouldn't it be corect to make the requirement libgdal1 >= 1.3.1 - I see no reason why gdal should break API. Best Jan -- Jan-Oliver Wagner: www.intevation.de/~jan | GISpatcher: www.gispatcher.de Kolab Konsortium : www.kolab-konsortium.de | Thuban : thuban.intevation.org Intevation GmbH : www.intevation.de | Kolab : www.kolab.org FreeGIS : www.freegis.org | GAV : www.grass-verein.de -------------- next part -------------- An embedded message was scrubbed... From: Luk Claes Subject: Bug#383145: Recommends unavailable libgdal1-1.3.1 Date: Tue, 15 Aug 2006 10:20:42 +0200 Size: 4698 Url: http://www.intevation.de/pipermail/thuban-devel/attachments/20060818/eaebef75/attachment.txt From joey at infodrom.org Sat Aug 19 17:50:21 2006 From: joey at infodrom.org (Martin Schulze) Date: Sat, 19 Aug 2006 17:50:21 +0200 Subject: Fwd: Bug#383145: Recommends unavailable libgdal1-1.3.1 In-Reply-To: <200608180849.33069.jan-oliver.wagner@intevation.de> References: <200608180849.33069.jan-oliver.wagner@intevation.de> Message-ID: <20060819155021.GS23180@finlandia.home.infodrom.org> Moin! Jan-Oliver Wagner wrote: > I saw this bug report from Debian. > Sounds like this might be a show stopper for Etch. Could become one, yes. > Wouldn't it be corect to make the requirement libgdal1 >= 1.3.1 > - I see no reason why gdal should break API. Did somebody try yet? Silke maybe? Content-Description: Luk Claes : Bug#383145: Recommends unavailable libgdal1-1.3.1 > Your package recommends libgdal1-1.3.1 which is not available in > unstable anymore. You might want to update the recommends to > libgdal1-1.3.2 after verifying that your package works with that version. Regards, Joey -- Unix is user friendly ... It's just picky about its friends. From bernhard at intevation.de Thu Aug 31 15:07:56 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Thu, 31 Aug 2006 15:07:56 +0200 Subject: Got a sid chroot now (was: More testsetups at my place.) In-Reply-To: <20060519084843.GB30111@intevation.de> References: <20060519084843.GB30111@intevation.de> Message-ID: <20060831130756.GA20904@intevation.de> Hi Dirik, Hi All, Am 19. May 2006 um 10:48:43 schrieb Bernhard Reiter: > to comment on some of the bugs, I will have to set up a bit > more of test environment here. > I need a chroot where I can run Debian unstable and test more > wx2.6 and postgresql stuff. taking me a long while, this is set up now! I could already build and start Thuban, but I did not test it, yet. Dirik: I have added you as a contributor when I updated the about dialog. Bernhard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060831/c5592d2f/attachment.bin From thuban-patches at wald.intevation.org Thu Aug 31 16:37:39 2006 From: thuban-patches at wald.intevation.org (thuban-patches@wald.intevation.org) Date: Thu, 31 Aug 2006 16:37:39 +0200 (CEST) Subject: =?UTF-8?B?W3RodWJhbi1QYXRjaGVzXVsxNzhdIDEuMS4wIHdpbmRvd3MgYnVpbGQg?= Message-ID: <20060831143739.6767718017E8@pyrosoma.intevation.org> Patches item #178, was opened at 2006-08-31 16:37 You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=107&aid=178&group_id=6 Or by replying to this e-mail entering your response between the following markers: #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ (enter your response here) #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ Status: Open Priority: 3 Submitted By: Didrik Pinte (dpinte) Assigned to: Nobody (None) Summary: 1.1.0 windows build Version: None Category: None Initial Comment: Using the proposed patch, you can build the 1.1.0 version and build the inno setup correctly with all the needed files (Lib, gdal, etc.). This patch has been used to generate the 1.1.0-6 installer available in the Files section. ---------------------------------------------------------------------- You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=107&aid=178&group_id=6