I agree too. Mike, thanks!
Chris, sorry to arrgh you :) Dane On Apr 1, 2009, at 12:43 PM, Michal Migurski wrote: > Agree - splat-imports make it extremely difficult to understand > example code. > > Here are (all?) the places on the wiki where they are used: > > http://www.google.com/search?q=%22from+mapnik+import%22+site%3Atrac.mapnik.org%2Fwiki > > It'd be worth fixing these, I've started with > http://trac.mapnik.org/wiki/GettingStarted > . > > -mike. > > On Apr 1, 2009, at 11:14 AM, Christopher Barker wrote: > >> Dane Springmeyer wrote: >>> in the 'world_map.py' you created make sure you have the line: >>> >>> from mapnik import * >> >> Please don't encourage "import *" in python scripts. Python >> namespaces >> are a wonderful thing -- let's use them. >> >> Every single package I'm involved in that used to encourage "import >> *", >> now encourages alternative imports: >> >> import wx >> >> from numpy import np >> >> etc. >> >> It is nice to have a standard form recommended for a package, >> perhaps: >> >> import mapnik as mk >> >> if you don't want to type "mapnik" all over the place >> >> [email protected] wrote: >>>>>> from mapnik import Map >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> ImportError: cannot import name Map >> >> This looks like he has a mapnik package, but it's not complete. >> >> arrgg! >> >> -Chris >> >> >> >> >> -- >> Christopher Barker, Ph.D. >> Oceanographer >> >> Emergency Response Division >> NOAA/NOS/OR&R (206) 526-6959 voice >> 7600 Sand Point Way NE (206) 526-6329 fax >> Seattle, WA 98115 (206) 526-6317 main reception >> >> [email protected] >> _______________________________________________ >> Mapnik-users mailing list >> [email protected] >> https://lists.berlios.de/mailman/listinfo/mapnik-users >> > > ---------------------------------------------------------------- > michal migurski- [email protected] > 415.558.1610 > > > > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

