[PEAK] Re: Trellis: ctrl.pulse

P.J. Eby pje at telecommunity.com
Wed Apr 15 17:17:17 EDT 2009


At 11:48 PM 4/15/2009 +0300, Sergey Schetinin wrote:
>On Wed, Apr 15, 2009 at 23:43, P.J. Eby <pje at telecommunity.com> wrote:
> > At 11:38 PM 4/15/2009 +0300, Sergey Schetinin wrote:
> >>
> >> On Wed, Apr 15, 2009 at 23:11, Sergey Schetinin <maluke at gmail.com> wrote:
> >> > Importing trellis from stm is ugly, and messes with lazy imports of
> >> > trellis (as done by Importing), replacing pulse with a special cell
> >> > doesn't seem to hard, see attached patch.
> >>
> >> Also, install_controller is unnecessary:
> >
> > install_controller() is an API function so that you can replace the
> > controller, e.g. for testing or for applications with special needs.
>
>Oh, I see, but given it populates the global namespace, if some other
>module already did "from peak.events.trellis import *" things will
>break.

Yes.  So don't do that.  ;-)


>Can it really be part of API?

Technically, I haven't documented it yet.  But that was the original 
intent of having it there.  At the moment it's more of a semi-private 
hack.  However, it's why you'll almost never see me importing stuff 
from 'trellis', as opposed to using 'trellis.whatever'.



More information about the PEAK mailing list