On Tue, Sep 15, 2015 at 2:43 AM, Werner <[email protected]> wrote:

> I see the following exception, it seems that in Py3 this is not importing
> methods starting with "_" when doing:
>
> from .FCObjects import *
>
> As per doc I think this should already have happened in Py2.7, no?
>

I would have thought so, yes.

>
> How to we fix it, add an "__all__" to FCObjects or rename
> "_colorGenerator" to "ColorGenerator"?
>

well, in theory, _colorGenerator is an implementation detail, and shouldn't
be exposed to the user. -- if it's called from outside .FCObjects, then
maybe it shouldn't be in there --- and in FloatCanvas instead.

but the easy fix is to just do the __all__ trick, so that's fine, too.

This is really the result of factoring the Object code out into its own
module, while trying to to change the API much...

Sorry, no time to look closer right now, so the easy option is fine :-)

-Chris




> Werner
>
>
>
>
>  File "d:\devMine\twcbv5\twcbsrc\controllers\fwinerackdesign.py", line
> 1625, in <module>
>   app.MainLoop()
> File "c:\Python34\Lib\site-packages\wx\core.py", line 1899, in MainLoop
>   rv = wx.PyApp.MainLoop(self)
>  File "d:\devMine\twcbv5\twcbsrc\controllers\fwinerackdesign.py", line
> 666, in addTriangle
>   self.doUnitTriangle()
>  File "d:\devMine\twcbv5\twcbsrc\controllers\fwinerackdesign.py", line
> 690, in doUnitTriangle
>   fcRackUnit.Bind(fc.EVT_FC_LEFT_DOWN, self.objectHit)
> File "c:\Python34\Lib\site-packages\wx\lib\floatcanvas\FloatCanvas.py",
> line 271, in Bind
>   self._Canvas.HitColorGenerator = _colorGenerator()
>
> builtins.NameError: name '_colorGenerator' is not defined
>
>
> _______________________________________________
> FloatCanvas mailing list
> [email protected]
> http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
>
>


-- 

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]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to