[4suite] Re: [XML-SIG] problem whith the error " ImportError: cannot import name boolean"

Mike Olson Mike.Olson@fourthought.com
28 Jul 2002 00:45:35 -0600


On Sat, 2002-07-27 at 23:52, Uche Ogbuji wrote:
> 
> Whatever is unclean about it?  It is using the environment for just what
> it is supposed to be.  Do you say that having clashing modules with the
> same name is cleaner?  I hardly think so.

It comes down to our difference of opinion on what env vars are used
for.  I think they should be used for a user of an application to give
information to the application.  Not as another place for an application
to store global variables.

The clashing modules is not an issue if people remove the previous
installation.  This is far from the first time that we have required
this.  It can even be added to our installation to see if the old one
exists and remove it.

> 
> Can you give a practical problem with my fix?  You yourself already
> provided a practical problem with your own.

Nope, just not the correct use of env vars.  I think the best solution
is to use the 2 boolean approach.

> 
> As for using builtings, I do think this would be too hacky.  The
> environment is just ideal for this sort of thing, as long as you're not
> on one of the small minority of POSIX OSes that treat the environment in
> strange ways.  And if you're on one of those, you have bigger problems
> with the environment.
> 
> > Actually, it is easier then that.  Looking at import precidence,
> > boolean.so will always get imported before boolean.py.  So, the only
> > time that boolean.py will get imported is in the installation
> > directory.  We should keep both boolean.py and rename booleanc.so back
> > to boolean.so, then we won't have any problems.
> 
> I already removed boolean.py.  I think it's a bad idea, and unnecessary,
> to boot.

I still like this solution better.  It does exactly what we need, does
not effect import time, does not improperly use env vars.  The only down
side to it is that it could confuse people that look at boolean.py in
the src tree but that it doesn;t get run.

Mike
> 
> 
> -- 
> Uche Ogbuji                                    Fourthought, Inc.
> http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
> Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
> Basic XML and RDF techniques for knowledge management, Part 7 -
> http://www-106.ibm.com/developerworks/xml/library/x-think12.html
> Keeping pace with James Clark -
> http://www-106.ibm.com/developerworks/xml/library/x-jclark.html
> Python and XML development using 4Suite, Part 3: 4RDF -
> http://www-105.ibm.com/developerworks/education.nsf/xml-onlinecourse-bytitle/8A1EA5A2CF4621C386256BBB006F4CEC
-- 
Mike Olson                                Principal Consultant
mike.olson@fourthought.com                +1 303 583 9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St,                      http://4Suite.org
Boulder, CO 80301-2537, USA
XML strategy, XML tools, knowledge management